Sign inGet Started

Create a registration attachment

POST
/v1/compliance/attachments
import { readFile } from "node:fs/promises";

const attachment = await bird.complianceAttachments.create({
  file: new Blob([await readFile("proof-of-address.pdf")]),
  filename: "proof-of-address.pdf",
  description: "Utility bill for the registered address",
});
// Cite this id as the answer's attachment_id in a submission.
console.log(attachment.id, attachment.content_type);
प्रतिक्रिया200
{
  "created_at": "2026-05-20T09:14:52Z",
  "updated_at": "2026-05-25T16:42:01Z",
  "id": "tca_01krdgeqcxet5s7t44vh8rt9mg",
  "status": "draft"
}

Uploads a document that answers a compliance requirement, such as the proof of address a country asks for before it approves a number. Send the file as a multipart/form-data body with the bytes in a file part.

A requirement whose data_type is document is answered with attachment IDs rather than a typed value. Pass the returned ID as the answer's attachment_id, or in its attachment_ids where the requirement accepts several. Upload before you file the submission that cites the attachment. An unused attachment expires after seven days. After a submission cites it, the attachment no longer expires and you can reuse it elsewhere in the workspace, including as evidence for a 10DLC registration. Toll-free verification evidence must be a PNG or JPEG image.

PNG, JPEG, and PDF files up to 10 MB are accepted. Uploading a file whose contents match an existing attachment returns that attachment instead of creating a duplicate.

Response Payload

created_at
string
आवश्यक
updated_at
string
आवश्यक
id
string
आवश्यक
filename
string
आवश्यक

The uploaded file's name.

content_type
string
आवश्यक

The file's content type, determined from its contents.

size_bytes
integer
आवश्यक

The file's size in bytes.

description
string

A short note describing what the file shows.

status
string
आवश्यक

Lifecycle of an attachment. draft is a file that has been uploaded but nothing has been registered or submitted with it yet, and it is discarded at its expires_at. attached means at least one registration has cited it, so it is kept permanently and can no longer be deleted.

Possible values: draft, attached

download_url
string
आवश्यक

Short-lived signed URL for downloading or previewing the attachment. Valid for 24 hours from when the resource was fetched; request a fresh resource to obtain a new URL after expiry. Do not cache beyond download_url_expires_at. Registration authorities (10DLC and toll-free carriers) retrieve evidence via a separate, longer-lived token; this URL is not that token.

preview_url
string

Optional signed URL for inline viewing on an isolated storage origin. Valid for one hour; fetch the attachment again to refresh it.

download_url_expires_at
string
आवश्यक

When download_url expires. Both fields are always present; the server returns an error rather than omitting them.

expires_at
nullable string
आवश्यक

When this attachment is discarded if nothing is registered or submitted with it. Null once its status is attached.

इस विषय के लिए दस्तावेज़, गाइड और उदाहरणों के साथ आगे बढ़ें।