# Fetch an attachment

Gets the matching attachment.

Endpoint: GET /attachments/{attachment_id}
Version: v4
Security: APIToken

## Path parameters:

  - `attachment_id` (string, required)
    Unique identifier for the resource instance.
    Example: "oqgkkd-fr5iv4-443db"

## Header parameters:

  - `Content-Type` (string, required)
    Enum: "application/json"

  - `Authorization` (string, required)
    Bearer token for authentication

  - `Accept` (string, required)
    Enum: "application/json"

## Query parameters:

  - `fields` (string)
    Set it to a comma-separated list (no spaces) of any of the following
attributes of the attachment to return as part of the attachment's
attributes in the response.

Allowed values: 

- metadata 
- thumbnail_url 
- view_thumbnail_retina 
- extension 
- version_count 
- tag_names 
- label_names

WARNING: This parameter can slow response times.
    Example: "metadata"

  - `include` (string)
    Set it to a comma-separated list (no spaces) of any of the following
record names to return those records related to the attachment you're
fetching. Related records are returned in an included array in the
response.

Allowed values: 

- asset
- section
- brandfolder
- collections
- tags
- labels

WARNING: This parameter can slow response times.
    Example: "brandfolder"

## Response 200 fields (application/json):

  - `data` (object, required)

  - `data.id` (string, required)
    Unique identifier for the resource instance.
    Example: "oqgkkd-fr3j84-33j7db"

  - `data.type` (string, required)
    The type of the resource.
    Enum: "attachments"

  - `data.attributes` (object, required)

  - `data.attributes.mimetype` (string, required)
    The MIME type of the file.
    Example: "image/png"

  - `data.attributes.extension` (string)
    The file suffix.
    Example: "png"

  - `data.attributes.filename` (string, required)
    The complete file name, including its suffix (if any).
    Example: "brandfolder_logo.png"

  - `data.attributes.size` (integer)
    The file size in bytes.
    Example: 123456

  - `data.attributes.width` (integer)
    The image width in pixels.
    Example: 1920

  - `data.attributes.height` (integer)
    The image height in pixels.
    Example: 1080

  - `data.attributes.url` (string, required)
    The file URL.
    Example: "https://some_domain.com/brandfolder_logo.png?expiry=1625260667"

  - `data.attributes.position` (integer)
    The attachment ranking position in the Brandfolder UI.

  - `data.attributes.thumbnail_url` (string)
    The URL of the the attachment's thumbnail image.
    Example: "https://some_domain.com/some_thumbnail.png"


