iTrade Internet API — Guide v1.2.0

Base URL https://api.itradeinternet.com

Authentication

Every versioned endpoint requires your iTrade API key in the X-API-Key header. Keys are issued by iTrade and are specific to your application. Send them from your server; do not embed them in a browser or mobile client.

curl -sS https://api.itradeinternet.com/voice/v1/departments \
  -H "X-API-Key: <your_itrade_api_key>"

A missing or unrecognised key returns 401 with code UNAUTHORIZED.

Response format

Every JSON response uses one envelope.

Success

{
  "status": "ok",
  "request_id": "9f1c2b7a4d0e5f31",
  "message": "Request completed successfully.",
  "data": { }
}

Failure

{
  "status": "error",
  "request_id": "9f1c2b7a4d0e5f31",
  "error": "The request contains invalid data.",
  "code": "VALIDATION_ERROR",
  "details": { "contact_number": "A valid contact number is required." }
}

details appears only when field-level feedback is available. request_id identifies the request in iTrade's logs — quote it when contacting support.

Error codes

CodeHTTPMeaning
BAD_REQUEST400The request could not be parsed or is malformed.
UNAUTHORIZED401Missing or invalid API key.
FORBIDDEN403The operation is not permitted for your account.
NOT_FOUND404No such route or resource.
METHOD_NOT_ALLOWED405The path exists but not for this method.
CONFLICT409Conflicts with current state, or an idempotent request is still running.
PAYLOAD_TOO_LARGE413Request body exceeds 10 MB.
VALIDATION_ERROR422Input failed validation; see details.
RATE_LIMITED429Too many requests; see Retry-After.
CAPABILITY_UNAVAILABLE501The capability is not enabled for your account.
NOT_IMPLEMENTED501The operation is not offered.
SERVICE_UNAVAILABLE503Temporarily unavailable; retry later.
UPSTREAM_TIMEOUT504The request timed out; retry.
GATEWAY_ERROR502The request could not be completed.

Idempotency

Endpoints that create billable or duplicable actions accept an optional X-Idempotency-Key header (8–128 characters, A–Z a–z 0–9 . _ -). Repeating a request with the same key and body replays the original response instead of performing the action again. A repeat sent while the first is still in flight returns 409 CONFLICT. Endpoints published before v1.2.0 are unaffected: without the header, behaviour is exactly as before.

Rate limiting

Limits are applied per API key. When a limit is exceeded the API returns 429 with code RATE_LIMITED and a Retry-After header giving the number of seconds to wait. Build retries with backoff and honour Retry-After.

Pagination

List endpoints that support paging accept limit and page, or limit and last_seen_id for cursor-style paging, depending on the resource. Supported parameters are listed against each endpoint below and in /openapi.json.

Call recordings

Call detail records may include a recording_url. These are iTrade URLs of the form /voice/v1/recordings/{ref}. Fetch them with your API key like any other endpoint. References are opaque and expire, so resolve them when you need the audio rather than storing them long-term.

Endpoints

Auto-Attendant

MethodPathPurposeNotes
GET/voice/v1/auto-attendantsList auto attendants
POST/voice/v1/auto-attendantsCreate a auto attendant
DELETE/voice/v1/auto-attendants/{id}Delete a auto attendant
GET/voice/v1/auto-attendants/{id}Fetch a auto attendant
PUT/voice/v1/auto-attendants/{id}Update a auto attendant

Broadcast

MethodPathPurposeNotes
POST/voice/v1/broadcastsCreate a broadcastaccepts X-Idempotency-Key
GET/voice/v1/broadcasts/batch-status/{id}Fetch batch status for broadcasts
DELETE/voice/v1/broadcasts/{id}Delete a broadcast
GET/voice/v1/broadcasts/{id}Fetch a broadcast
PUT/voice/v1/broadcasts/{id}Update a broadcast
POST/voice/v1/broadcasts/{id}:endEnd broadcasts
POST/voice/v1/broadcasts/{id}:pausePause broadcasts
POST/voice/v1/broadcasts/{id}:resumeResume broadcasts
POST/voice/v1/broadcasts/{id}:startStart broadcastsaccepts X-Idempotency-Key; billable; query: start_date_time, end_date_time
GET/voice/v2/broadcastsList broadcastsquery: limit, broadcast_id, page

Contacts

MethodPathPurposeNotes
GET/voice/v1/contact-groupsList contact groupsquery: contact_group_id, updated_after, limit, page
POST/voice/v1/contact-groupsCreate a contact group
DELETE/voice/v1/contact-groups/{id}Delete a contact group
PUT/voice/v1/contact-groups/{id}Update a contact group
GET/voice/v1/contactsList contactsquery: contact_id, contact_group_id, updated_after, limit, page
DELETE/voice/v1/contacts/{id}Delete a contact
POST/voice/v1/contacts/{id}Create a contact
PUT/voice/v1/contacts/{id}Update a contact
POST/voice/v1/contacts/{id}:bulkBulk create contactsaccepts X-Idempotency-Key

DND

MethodPathPurposeNotes
GET/voice/v1/dnd-leadsList DND leadsquery: limit, last_seen_id, list_id, id
POST/voice/v1/dnd-leadsCreate a DND lead
DELETE/voice/v1/dnd-leads/{id}Delete a DND lead
PUT/voice/v1/dnd-leads/{id}Update a DND lead
GET/voice/v1/dnd-listsList DND listsquery: limit, sort_dir, cursor, name, updated_after
POST/voice/v1/dnd-listsCreate a DND list
DELETE/voice/v1/dnd-lists/{id}Delete a DND list
PUT/voice/v1/dnd-lists/{id}Update a DND list
DELETE/voice/v1/dnd-lists/{id}/leads:bulkBulk delete DND leads
POST/voice/v1/dnd-lists/{id}/leads:bulkBulk create DND leadsaccepts X-Idempotency-Key

Departments

MethodPathPurposeNotes
GET/voice/v1/departmentsList departmentsavailable since v1.1.0
POST/voice/v1/departmentsCreate a department
DELETE/voice/v1/departments/{id}Delete a department
PUT/voice/v1/departments/{id}Update a departmentavailable since v1.1.0

Dialer

MethodPathPurposeNotes
GET/voice/v1/dialer/agent-scriptsList agent scripts
POST/voice/v1/dialer/agent-scriptsCreate a agent script
DELETE/voice/v1/dialer/agent-scripts/{id}Delete a agent script
GET/voice/v1/dialer/agent-scripts/{id}Fetch a agent script
PUT/voice/v1/dialer/agent-scripts/{id}Update a agent script
GET/voice/v1/dialer/break-listsList break lists
POST/voice/v1/dialer/break-listsCreate a break list
DELETE/voice/v1/dialer/break-lists/{id}Delete a break list
PUT/voice/v1/dialer/break-lists/{id}Update a break list
POST/voice/v1/dialer/breaks:endEnd breaks
POST/voice/v1/dialer/breaks:startStart breaks
GET/voice/v1/dialer/callbacksList callbacksquery: from_date, to_date
POST/voice/v1/dialer/callbacksCreate a callbackaccepts X-Idempotency-Key
GET/voice/v1/dialer/callbacks/{callback_id}Fetch a callback
PUT/voice/v1/dialer/callbacks/{callback_id}Update a callback
POST/voice/v1/dialer/calls:disconnectDisconnect calls
GET/voice/v1/dialer/campaignsList campaigns
POST/voice/v1/dialer/campaignsCreate a campaign
DELETE/voice/v1/dialer/campaigns/{id}Delete a campaign
GET/voice/v1/dialer/campaigns/{id}Fetch a campaign
PUT/voice/v1/dialer/campaigns/{id}Update a campaign
GET/voice/v1/dialer/disposition-listsList disposition lists
POST/voice/v1/dialer/disposition-listsCreate a disposition list
DELETE/voice/v1/dialer/disposition-lists/{id}Delete a disposition list
PUT/voice/v1/dialer/disposition-lists/{id}Update a disposition list
POST/voice/v1/dialer/disposition-statusesCreate a disposition statuse
DELETE/voice/v1/dialer/disposition-statuses/{id}Delete a disposition statuse
GET/voice/v1/dialer/disposition-statuses/{id}Fetch a disposition statuse
PUT/voice/v1/dialer/disposition-statuses/{id}Update a disposition statuse
POST/voice/v1/dialer/disposition-statuses:bulkBulk create disposition statusesaccepts X-Idempotency-Key
POST/voice/v1/dialer/dispositions:update-detailsUpdate a disposition
GET/voice/v1/dialer/inbound-queuesList inbound queues
POST/voice/v1/dialer/inbound-queuesCreate a inbound queue
DELETE/voice/v1/dialer/inbound-queues/{id}Delete a inbound queue
GET/voice/v1/dialer/inbound-queues/{id}Fetch a inbound queue
PUT/voice/v1/dialer/inbound-queues/{id}Update a inbound queue
POST/voice/v1/dialer/pause-codesCreate a pause code
DELETE/voice/v1/dialer/pause-codes/{id}Delete a pause code
GET/voice/v1/dialer/pause-codes/{id}Fetch a pause code
PUT/voice/v1/dialer/pause-codes/{id}Update a pause code
GET/voice/v1/dialer/quick-transfer-listsList quick transfer lists
POST/voice/v1/dialer/quick-transfer-listsCreate a quick transfer list
DELETE/voice/v1/dialer/quick-transfer-lists/{id}Delete a quick transfer list
PUT/voice/v1/dialer/quick-transfer-lists/{id}Update a quick transfer list
POST/voice/v1/dialer/quick-transfer-numbersCreate a quick transfer number
DELETE/voice/v1/dialer/quick-transfer-numbers/{id}Delete a quick transfer number
GET/voice/v1/dialer/quick-transfer-numbers/{id}Fetch a quick transfer number
PUT/voice/v1/dialer/quick-transfer-numbers/{id}Update a quick transfer number
POST/voice/v1/dialer/sessions:callCall sessionsaccepts X-Idempotency-Key; billable
POST/voice/v1/dialer/sessions:logoutLogout sessions
GET/voice/v1/dialer/skill-listsList skill lists
GET/voice/v1/dialer/skill-lists/{skill_list_id}/skillsList skillsquery: limit

IVR

MethodPathPurposeNotes
GET/voice/v1/ivrsList IVRs
POST/voice/v1/ivrsCreate a IVR
DELETE/voice/v1/ivrs/{id}Delete a IVR
PUT/voice/v1/ivrs/{id}Update a IVR

Interactions Hub

MethodPathPurposeNotes
POST/voice/v1/interactions:click-to-interactionClick interactionsaccepts X-Idempotency-Key; billable

Lead Lists

MethodPathPurposeNotes
GET/voice/v1/lead-listsList lead lists
POST/voice/v1/lead-listsCreate a lead list
DELETE/voice/v1/lead-lists/{id}Delete a lead list
PUT/voice/v1/lead-lists/{id}Update a lead list
PATCH/voice/v1/lead-lists/{id}/leadsPatch the leads in lead lists

Leads

MethodPathPurposeNotes
GET/voice/v1/lead-lists/{id}/leadsList leadsquery: number
POST/voice/v1/lead-lists/{id}/leadsCreate a lead
DELETE/voice/v1/lead-lists/{id}/leads:bulkBulk delete leads
POST/voice/v1/lead-lists/{id}/leads:bulkBulk create leadsaccepts X-Idempotency-Key
DELETE/voice/v1/leads/{id}Delete a lead
PUT/voice/v1/leads/{id}Update a lead

Numbers

MethodPathPurposeNotes
GET/voice/v1/blocked-numbersList blocked numbers
POST/voice/v1/blocked-numbersCreate a blocked number
DELETE/voice/v1/blocked-numbers/{id}Delete a blocked number
PUT/voice/v1/blocked-numbers/{id}Update a blocked number
GET/voice/v1/my-numbersList DID numbersavailable since v1.1.0
PUT/voice/v1/my-numbers/{id}Update a DID numberavailable since v1.1.0

Schedule Calls

MethodPathPurposeNotes
GET/voice/v1/schedule-callsList scheduled callsquery: limit, type, to_date, page, from_date
POST/voice/v1/schedule-callsCreate a scheduled callaccepts X-Idempotency-Key
DELETE/voice/v1/schedule-calls/{id}Delete a scheduled call
PUT/voice/v1/schedule-calls/{id}Update a scheduled call

Time Groups

MethodPathPurposeNotes
GET/voice/v1/time-groupsList time groups
POST/voice/v1/time-groupsCreate a time group
DELETE/voice/v1/time-groups/{id}Delete a time group

Users

MethodPathPurposeNotes
GET/voice/v1/usersList usersavailable since v1.1.0
POST/voice/v1/usersCreate a user
DELETE/voice/v1/users/{id}Delete a user
GET/voice/v1/users/{id}Fetch a user
PATCH/voice/v1/users/{id}Update a useravailable since v1.1.0

Voice

MethodPathPurposeNotes
GET/voice/v1/call-notes/by-number/{client_number}List call notesquery: limit, page
DELETE/voice/v1/call-notes/{id}Delete a call note
PUT/voice/v1/call-notes/{id}Update a call note
GET/voice/v1/call-recordsList call detail recordsavailable since v1.1.0
POST/voice/v1/calls/{id}/notesCreate a call note
POST/voice/v1/calls:clicktocallStart callsavailable since v1.1.0; billable; alias: /voice/v1/calls:click_to_call
POST/voice/v1/calls:clicktocallsupportClicktocallsupport callsavailable since v1.1.0; billable; alias: /voice/v1/calls:click_to_call_support
POST/voice/v1/calls:hangupHang up callsavailable since v1.1.0
POST/voice/v1/calls:optionsApply options to callsavailable since v1.1.0
GET/voice/v1/live-callsList active callsavailable since v1.1.0
GET/voice/v1/live-calls:searchSearch active callsquery: agent_number, extension, did_number, call_id

Machine-readable specification: /openapi.json