Skip to main content

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="
    }
  }
}
Create a new company

HTTP Request

POST /v2/companies

Body Parameters

ParameterRequiredData TypeDescription
nametruestringThe name of the advertiser
urltruestringThe url that is associated with the advertiser
categorytruestringThe IAB category associated with the advertiser
filenamefalsestringThe file name of the advertiser’s logo including extension
statusfalsebooleanThe status of the advertiser. Defaults to true
account_typefalsestringThe account type. Defaults to audiohook
trialfalsebooleanIf the advertiser is in a trial. Defaults to true
owner_idfalseintUser ID under which the advertiser is created