Upload a logo for the domain
This request is used for uploading a logo for the domain.
Once the logo has been uploaded, it will be displayed in the interface of each mailbox, in the upper-left corner of the window:
The file should be transmitted in GIF, JPEG, or PNG format, and the maximum file size is 2 MB.
Request syntax
The request should be sent over the HTTPS protocol using the POST method with the content type multipart/form-data
.
POST /api2/admin/domain/logo/set
Host: pddimp.yandex.ru
Accept: */*
PddToken: <PDD token>
Content-Length: <size of the request body in bytes>
Content-Type: multipart/form-data; boundary=---------------some-boundary-string-of-your-choice
---------------some-boundary-string-of-your-choice
Content-Disposition: form-data; name="domain"
<domain name>
---------------some-boundary-string-of-your-choice
Content-Disposition: form-data; name="file"; filename="logo"
Content-Type: image/jpeg
<contents of the logo file in binary format>
---------------some-boundary-string-of-your-choice
Headers:
Name | Description |
---|---|
PddToken | |
Content-Type | Specify the type |
Content-Disposition | You should specify:
|
Name | Description |
---|---|
PddToken | |
Content-Type | Specify the type |
Content-Disposition | You should specify:
|
POST /api2/registrar/domain/logo/set
Host: pddimp.yandex.ru
Accept: */*
PddToken: <PDD token>
Authorization: OAuth <OAuth token>
Content-Length: <length of request body in bytes>
Content-Type: multipart/form-data; boundary=---------------some-boundary-string-of-your-choice
---------------some-boundary-string-of-your-choice
Content-Disposition: form-data; name="domain"
<domain name>
---------------some-boundary-string-of-your-choice
Content-Disposition: form-data; name="file"; filename="logo"
Content-Type: image/jpeg
<logotype file contents in binary format>
---------------some-boundary-string-of-your-choice
Headers:
Name | Description |
---|---|
PddToken | |
Authorization | |
Content-Type | Specify the type |
Content-Disposition | You should specify:
|
Name | Description |
---|---|
PddToken | |
Authorization | |
Content-Type | Specify the type |
Content-Disposition | You should specify:
|
Request example
POST /api2/admin/domain/logo/set HTTP/1.1
Host: pddimp.yandex.ru
Accept: */*
PddToken: 123456789ABCDEF0000000000000000000000000000000000000
Content-Length: 301
Content-Type: multipart/form-data; boundary=----------------------------60f093b65ad7
----------------------------60f093b65ad7
Content-Disposition: form-data; name="domain"
domain.com
----------------------------60f093b65ad7
Content-Disposition: form-data; name="file"; filename="logo"
Content-Type: image/jpeg
{contents of the logo file in binary format}
----------------------------60f093b65ad7
curl -H 'PddToken: 123456789ABCDEF0000000000000000000000000000000000000' -F 'domain=domain.com' -F 'file=@local_logo_file.jpg;filename=logo' 'http://pddimp.yandex.ru/api2/admin/domain/logo/set'
POST /api2/admin/domain/logo/set HTTP/1.1
Host: pddimp.yandex.ru
Accept: */*
PddToken: 123456789ABCDEF0000000000000000000000000000000000000
Authorization: OAuth 00123456789ABCDEF00000000000000000000000000000000000
Content-Length: 301
Content-Type: multipart/form-data; boundary=----------------------------60f093b65ad7
----------------------------60f093b65ad7
Content-Disposition: form-data; name="domain"
domain.com
----------------------------60f093b65ad7
Content-Disposition: form-data; name="file"; filename="logo"
Content-Type: image/jpeg
{contents of the logo file in binary format}
----------------------------60f093b65ad7
curl -H 'PddToken: 123456789ABCDEF0000000000000000000000000000000000000' -H 'Authorization: OAuth 00123456789ABCDEF00000000000000000000000000000000000' -F 'domain=domain.com' -F 'file=@local_logo_file.jpg;filename=logo' 'http://pddimp.yandex.ru/api2/admin/domain/logo/set'
Response structure
{
"domain": "{domain name}",
"success": "{status of request execution}",
"error": "{error code}"
}
Name | Type of value | Description |
---|---|---|
domain | String | Name of the domain. |
success | String | Status of request execution. Possible values:
|
error | String | Error code. Included in the response if the request resulted in an error. Possible values:
|
Name | Type of value | Description |
---|---|---|
domain | String | Name of the domain. |
success | String | Status of request execution. Possible values:
|
error | String | Error code. Included in the response if the request resulted in an error. Possible values:
|