Create an Attachment

Create a new attachment and it returns the newly created attachment resource

📘

Supported Regions and Base URLs

👍

Access and Registration

Authentication

Scope

attachments:write

Body Request - Example

{
  "name": "calm-down-song.mp3",
  "request_id": "9821123e4567e89b12d3a456426655440011",
  "metadata": {
    "flow_id": "ABCEDF0987654321",
    "name": "1111.jpg",
    "size": 1143840,
    "type": "image/jpeg"
  }
}

Body Schema - Response

200 OK (the newly created attachment resource)

ParameterTypeDescriptionRequired
idstringthe ID of the attachmentyes
namestringn/ayes
statestringthe current state of the attachmentyes
sizeintegerthe attachment sizeno
typestringthe attachment typeno
metadataobjectn/ano
providerobjectn/ano
_linksobjectHAL API-related links.

1 - "self" (object) - link to fetch the detail of the asset
1.1 - "href" (string) - Address of the resource. Default:
https://xxxx.talkdesk.com/assets/{id}

2 - "download_link" (object) - link used to generate a download link
2.1 - "href" (string) - Download link generation address. Default:
https://xxxx.talkdesk.com/assets/{id}/download-link
no

400 (validation constraint violation), 401 (unauthorized access - invalid or unverifiable JWT), 403 (forbidden), 409 (Attachment naming conflict. Already has an attachment with this name)

ParameterTypeDescriptionRequired
codestringn/ayes
messagestringn/ayes
descriptionstringn/ano
fieldsarray[object]"fields" subdivides into:

"name" (string)

"description" (string)
yes (name and description)

❗️

API Availability

The Attachments API is only available for customers enrolled in Talkdesk's Early Access (EA) program.

To enter the EA program, contact a Customer Sucess Manager.

The Attachments API has been in GA since May 2022.

🚧

Troubleshooting

If you have any questions regarding the usage of this API, or if you’re having any technical issues, please open a ticket using this form.

Language
Credentials
Header
Click Try It! to start a request and see the response here!