Create a company
Request example
curl -X POST https://betaapi.audiohook.com/v2/companies/ \
-H "Authorization: Bearer ${API_TOKEN}" \
-H "Content-Type: application/json" \
-H "ui-referer: ADVERTISER" \
-d '{
"request_headers": [
{ "name": "X-Request-Header", "value": "Header value" }
],
"body": {
"name": "test-advertiser",
"url": "https://www.testadvertisersite.com",
"category": "IAB3-1",
"filename": "mylogo.png"
}
}'
Response sample
200 OK
{
"Advertiser": {
"Advertiser": {
"id": 999999,
"uuid": "test-advertiser-uuid"
}
},
"s3_data": {
"url": "https://ah-advertiser-creatives-input.s3.amazonaws.com/",
"fields": {
"key": "test-advertiser-uuid/logo_mylogo.png",
"AWSAccessKeyId": "ASHJDUIASHIUDASHDUIASHdi",
"policy": "eyJleHBpcmF0aW9uIjogIjIwMjMtMDItMTBUMDA6NDI6MDJaIiwgImNvbmRpdGlvbnMiOiBbeyJidWNrZXQiOiAiYWgtYWR2ZXJ0aXNlci1jcmVhdGl2ZXMtaW5wdXQifSwgeyJrZXkiOiAiZmU5NTMxMGUtNmY2Zi00YWFkLWFhZDYtYzE4YWE3ZDg0ZWM3L2NyZWF0aXZlcy80OTQxL2F1ZGlvYWQubXAzIn1dfQ==",
"signature": "ejEoRYAWr7iRJKPaugKgsQul5UY="
}
}
}
HTTP Request
POST /v2/companies
Body Parameters
| Parameter | Required | Data Type | Description |
|---|---|---|---|
| name | true | string | The name of the advertiser |
| url | true | string | The url that is associated with the advertiser |
| category | true | string | The IAB category associated with the advertiser |
| filename | false | string | The file name of the advertiser’s logo including extension |
| status | false | boolean | The status of the advertiser. Defaults to true |
| account_type | false | string | The account type. Defaults to audiohook |
| trial | false | boolean | If the advertiser is in a trial. Defaults to true |
| owner_id | false | int | User ID under which the advertiser is created |

