API reference navigation
POST /v1/account/attachments

Create an account attachment

Access
Authenticated
project:update
Cost
Free
Rate limit
30 / minute per account
Quota
None

Attach a JD/link/doc to the account.

Request body CreateAttachmentRequest

  • kind string required

    What kind of attachment this is. It decides whether `url` or `fileRef` is the one to send.

    jdlinkdoc
  • name string required

    Your label for it.

    min 1 chars, max 200 chars
  • url string

    The URL to attach, on a link attachment. Recorded as context and not fetched, so a link alone does not put its content into a brief.

    max 2000 chars
  • fileRef string

    The id of a file you already uploaded and finalized, on a file attachment.

    min 1 chars, max 500 chars

Responses

  • 201 The created attachment
    • id string required

      The attachment id. Pass it in `attachmentIds` when creating a project to fold it into the brief.

    • subjectType string | null required

      What this attachment is attached to: a company, a project, or the account. Null while it is unattached.

    • subjectId string | null required

      The id of that subject. Null while unattached.

    • kind string required

      What kind of attachment this is, which decides whether it carries a `url` or a `fileRef`.

    • name string required

      Your label for the attachment.

    • url string | null required

      The linked URL, on a link attachment. Recorded as context; not fetched on your behalf. Null on a file attachment.

    • fileRef string | null required

      The uploaded file this attachment points at. Null on a link attachment.

    • addedBy string | null required

      The member or key that added it. Null when unknown.

    • createdAt string required

      When it was added, as an ISO 8601 instant.

    • updatedAt string required

      When it last changed, as an ISO 8601 instant.

  • 400 A link without a url, a bad url, or an unknown kind
    • code string required

      Stable machine-readable error code. Branch on this, never on the numeric status.

      bad_requestunauthorizedsignature_requiredpayment_requiredforbiddennot_foundconflictgonepayload_too_largeunprocessable_entitytoo_many_requestsinternal_errornot_implementedbilling_unavailablenot_contactablemailbox_link_unavailablemailbox_requiredmail_engine_unavailablewebhook_publisher_unavailabledatabase_unavailableclient_error
    • message string required

      Human-readable explanation of the refusal.

    • status integer required

      The HTTP status code, repeated in the body.

    • remedy object

      A self-serve path forward, when one exists (a 402 points at the credit top-up).

      • kind string required

        What kind of remedy this is, so a client can route it: whether the caller can clear the condition through the API, or a person must act in the web app.

        topupconnect_mailbox
      • url string required

        Where to go to clear the condition: an API path, or a web app page when only a person can.

  • 401 No or invalid credential
    • code string required

      Stable machine-readable error code. Branch on this, never on the numeric status.

      bad_requestunauthorizedsignature_requiredpayment_requiredforbiddennot_foundconflictgonepayload_too_largeunprocessable_entitytoo_many_requestsinternal_errornot_implementedbilling_unavailablenot_contactablemailbox_link_unavailablemailbox_requiredmail_engine_unavailablewebhook_publisher_unavailabledatabase_unavailableclient_error
    • message string required

      Human-readable explanation of the refusal.

    • status integer required

      The HTTP status code, repeated in the body.

    • remedy object

      A self-serve path forward, when one exists (a 402 points at the credit top-up).

      • kind string required

        What kind of remedy this is, so a client can route it: whether the caller can clear the condition through the API, or a person must act in the web app.

        topupconnect_mailbox
      • url string required

        Where to go to clear the condition: an API path, or a web app page when only a person can.

  • 403 Missing project:update
    • code string required

      Stable machine-readable error code. Branch on this, never on the numeric status.

      bad_requestunauthorizedsignature_requiredpayment_requiredforbiddennot_foundconflictgonepayload_too_largeunprocessable_entitytoo_many_requestsinternal_errornot_implementedbilling_unavailablenot_contactablemailbox_link_unavailablemailbox_requiredmail_engine_unavailablewebhook_publisher_unavailabledatabase_unavailableclient_error
    • message string required

      Human-readable explanation of the refusal.

    • status integer required

      The HTTP status code, repeated in the body.

    • remedy object

      A self-serve path forward, when one exists (a 402 points at the credit top-up).

      • kind string required

        What kind of remedy this is, so a client can route it: whether the caller can clear the condition through the API, or a person must act in the web app.

        topupconnect_mailbox
      • url string required

        Where to go to clear the condition: an API path, or a web app page when only a person can.

  • 404 Subject missing or in another account
    • code string required

      Stable machine-readable error code. Branch on this, never on the numeric status.

      bad_requestunauthorizedsignature_requiredpayment_requiredforbiddennot_foundconflictgonepayload_too_largeunprocessable_entitytoo_many_requestsinternal_errornot_implementedbilling_unavailablenot_contactablemailbox_link_unavailablemailbox_requiredmail_engine_unavailablewebhook_publisher_unavailabledatabase_unavailableclient_error
    • message string required

      Human-readable explanation of the refusal.

    • status integer required

      The HTTP status code, repeated in the body.

    • remedy object

      A self-serve path forward, when one exists (a 402 points at the credit top-up).

      • kind string required

        What kind of remedy this is, so a client can route it: whether the caller can clear the condition through the API, or a person must act in the web app.

        topupconnect_mailbox
      • url string required

        Where to go to clear the condition: an API path, or a web app page when only a person can.