# Individual Account Attachment

Individual Account Attachments are the document images you attach to an Individual Account Request so the account-approval flow can verify the holder. Each attachment references its parent request by `accountRequestId`.

An attachment is created in `created` status. When the parent Individual Account Request is patched to `processing`, every `created` attachment of that request moves to `processing`; once the approval pipeline finishes, they move to `success`. Every transition produces an Individual Account Attachment Log.

**NOTE:** One attachment per request, and the same `type` cannot be sent twice for the same Individual Account Request. Document types of different sets cannot be mixed on the same request: send either the identity pair (`identity-front` and `identity-back`) or the driver's license pair (`drivers-license-front` and `drivers-license-back`).

### The IndividualAccountAttachment object

**Attributes**

| Name | Type | Description |
| --- | --- | --- |
| `id` | STRING | Unique id for the individual account attachment. Example: "5949351771144192". |
| `type` | STRING | Type of document attached. Options: "identity-front", "identity-back", "drivers-license-front", "drivers-license-back". |
| `accountRequestId` | STRING | Id of the Individual Account Request that owns this attachment. Example: "5189530608992256". |
| `tags` | LIST OF STRINGS | Tags associated with the individual account attachment. |
| `status` | STRING | Current status of the attachment. Options: "created", "canceled", "processing", "success", "failed", "deleted". |
| `created` | STRING | Creation datetime. Example: "2026-06-12T12:02:00.000000+00:00". |

### Create an Individual Account Attachment

`POST /v2/individual-account-attachment`

Use this route to attach one document image to a previously created Individual Account Request.

**Validations:** the `attachments` array accepts exactly **1 element per request**; `content` must be a base64 data url whose MIME type is `image/png` or `image/jpeg` and whose decoded payload is smaller than 64 MB; the parent Individual Account Request must exist in your workspace and be in `created` status; the `type` must not already be attached to that request, and must belong to the same document set as the types already attached.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `type` | REQUIRED | Type of document being attached. Options: "identity-front", "identity-back", "drivers-license-front", "drivers-license-back". Example: "identity-front". |
| `content` | REQUIRED | Document image encoded as a base64 data url. Example: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUg...". |
| `accountRequestId` | REQUIRED | Id of the Individual Account Request that owns the attachment. Example: "5189530608992256". |
| `tags` | OPTIONAL | List of strings to tag the entity for future queries. Max = 100 tags of up to 100 characters each. Example: ["employees", "monthly"]. |

**Request**

```python
import starkinfra

attachments = starkinfra.individualaccountattachment.create([
    starkinfra.IndividualAccountAttachment(
        type="identity-front",
        content=open("identity-front.png", "rb").read(),
        content_type="image/png",
        account_request_id="5189530608992256",
        tags=["employees", "monthly"]
    )
])

for attachment in attachments:
    print(attachment)
```

**Response**

```python
[
    IndividualAccountAttachment(
        id="5949351771144192",
        type="identity-front",
        account_request_id="5189530608992256",
        tags=["employees", "monthly"],
        status="created",
        created="2026-06-12T12:02:00.000000+00:00"
    )
]
```

### List Individual Account Attachments

`GET /v2/individual-account-attachment`

List and filter the individual account attachments in your workspace. Results are returned paged via cursor, newest first.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `after` | OPTIONAL | Filter entities created after this date. Example: "2026-06-01". |
| `before` | OPTIONAL | Filter entities created before this date. Example: "2026-06-30". |
| `cursor` | OPTIONAL | String used to get the next batch of results. Our SDKs handle this for you. |
| `limit` | OPTIONAL | Number of results per cursor. Max = 100. |
| `status` | OPTIONAL | Filter attachments by status. Options: "created", "canceled", "processing", "success", "failed", "deleted". |
| `tags` | OPTIONAL | Filter entities that contain the specified tags. Example: ["employees", "monthly"]. |
| `ids` | OPTIONAL | List of strings to get specific entities by ids. Max = 100. Example: ["5949351771144192", "4545454545454545"]. |
| `accountRequestIds` | OPTIONAL | List of Individual Account Request ids to filter the attachments. Max = 100. Not available in the SDKs. Example: ["5189530608992256"]. |
| `fields` | OPTIONAL | List of strings to filter response JSON keys. Not available in the SDKs. |

**Request**

```python
import starkinfra
from datetime import date

attachments = starkinfra.individualaccountattachment.query(
    limit=10,
    after=date(2026, 6, 1),
    before=date(2026, 6, 30),
    status="success",
    tags=["employees", "monthly"]
)

for attachment in attachments:
    print(attachment)
```

**Response**

```python
IndividualAccountAttachment(
    id="5949351771144192",
    type="identity-front",
    account_request_id="5189530608992256",
    tags=["employees", "monthly"],
    status="success",
    created="2026-06-12T12:02:00.000000+00:00"
)
IndividualAccountAttachment(
    id="6304472403935232",
    type="identity-back",
    account_request_id="5189530608992256",
    tags=["employees", "monthly"],
    status="success",
    created="2026-06-12T12:04:00.000000+00:00"
)
```

### Get an Individual Account Attachment

`GET /v2/individual-account-attachment/:id`

Get a single individual account attachment by its id.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `id` | REQUIRED | Id of the individual account attachment entity. Example: "5949351771144192". |

**Request**

```python
import starkinfra

attachment = starkinfra.individualaccountattachment.get("5949351771144192")

print(attachment)
```

**Response**

```python
IndividualAccountAttachment(
    id="5949351771144192",
    type="identity-front",
    account_request_id="5189530608992256",
    tags=["employees", "monthly"],
    status="success",
    created="2026-06-12T12:02:00.000000+00:00"
)
```

### Cancel an Individual Account Attachment

`DELETE /v2/individual-account-attachment/:id`

Cancel an individual account attachment. The returned entity has status `deleted`.

Only attachments whose parent Individual Account Request is still in `created` status can be deleted.

**Note:** This action cannot be undone.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `id` | REQUIRED | Id of the individual account attachment entity. Example: "5949351771144192". |

**Request**

```python
import starkinfra

attachment = starkinfra.individualaccountattachment.cancel("5949351771144192")

print(attachment)
```

**Response**

```python
IndividualAccountAttachment(
    id="5949351771144192",
    type="identity-front",
    account_request_id="5189530608992256",
    tags=["employees", "monthly"],
    status="deleted",
    created="2026-06-12T12:02:00.000000+00:00"
)
```

### List Individual Account Attachment Logs

`GET /v2/individual-account-attachment/log`

Get a paged list of individual account attachment logs. A log tracks a change in the individual account attachment entity according to its lifecycle.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `after` | OPTIONAL | Filter entities created after this date. Example: "2026-06-01". |
| `before` | OPTIONAL | Filter entities created before this date. Example: "2026-06-30". |
| `cursor` | OPTIONAL | String used to get the next batch of results. Our SDKs handle this for you. |
| `limit` | OPTIONAL | Number of results per cursor. Max = 100. |
| `types` | OPTIONAL | Filter logs by log type. Options: "created", "canceled", "deleted", "processing", "sent", "success", "failed". |
| `attachmentIds` | OPTIONAL | List of individual account attachment ids linked to the desired logs. Max = 100. Example: ["5949351771144192"]. |
| `fields` | OPTIONAL | List of strings to filter response JSON keys. Not available in the SDKs. |

**Request**

```python
import starkinfra
from datetime import date

logs = starkinfra.individualaccountattachment.log.query(
    limit=50,
    after=date(2026, 6, 1),
    before=date(2026, 6, 30),
    types=["created", "success"],
    attachment_ids=["5949351771144192"]
)

for log in logs:
    print(log)
```

**Response**

```python
Log(
    id="6172091654176768",
    type="created",
    errors=[],
    attachment=IndividualAccountAttachment(
        id="5949351771144192",
        type="identity-front",
        account_request_id="5189530608992256",
        tags=["employees", "monthly"],
        status="created",
        created="2026-06-12T12:02:00.000000+00:00"
    ),
    created="2026-06-12T12:02:00.000000+00:00"
)
```

### Get an Individual Account Attachment Log

`GET /v2/individual-account-attachment/log/:id`

Get a single individual account attachment log by its id.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `id` | REQUIRED | Id of the individual account attachment log entity. Example: "6172091654176768". |
| `fields` | OPTIONAL | List of strings to filter response JSON keys. Not available in the SDKs. |

**Request**

```python
import starkinfra

log = starkinfra.individualaccountattachment.log.get("6172091654176768")

print(log)
```

**Response**

```python
Log(
    id="6172091654176768",
    type="created",
    errors=[],
    attachment=IndividualAccountAttachment(
        id="5949351771144192",
        type="identity-front",
        account_request_id="5189530608992256",
        tags=["employees", "monthly"],
        status="created",
        created="2026-06-12T12:02:00.000000+00:00"
    ),
    created="2026-06-12T12:02:00.000000+00:00"
)
```

## Available Languages

Code samples on this page are in Python. The same content is available with samples in:

- [Python](https://docs.starkinfra.com/api/v2/individual-account-attachment-python.md)
- [Node.js](https://docs.starkinfra.com/api/v2/individual-account-attachment-node.md)
- [PHP](https://docs.starkinfra.com/api/v2/individual-account-attachment-php.md)
- [Java](https://docs.starkinfra.com/api/v2/individual-account-attachment-java.md)
- [Ruby](https://docs.starkinfra.com/api/v2/individual-account-attachment-ruby.md)
- [Elixir](https://docs.starkinfra.com/api/v2/individual-account-attachment-elixir.md)
- [.NET](https://docs.starkinfra.com/api/v2/individual-account-attachment-dotnet.md)
- [Go](https://docs.starkinfra.com/api/v2/individual-account-attachment-go.md)
- [Clojure](https://docs.starkinfra.com/api/v2/individual-account-attachment-clojure.md)
- [cURL](https://docs.starkinfra.com/api/v2/individual-account-attachment-curl.md)
