---
title: "Get a membership file URL"
method: GET
path: "/v1/company_memberships/{id}/file"
tags: ["Company membership"]
---

# Get a membership file URL

`GET /v1/company_memberships/{id}/file`

## Request

- Base URL: `https://api.cardda.com`
- URL: `https://api.cardda.com/v1/company_memberships/{id}/file`
- Auth: HTTP bearer

Returns a short-lived presigned URL for a file stored in Active Storage for
the membership (e.g. an identification or powers document). The attachment is
selected by the **required** `file_name` query parameter, which must be one of
the membership's allowed attachment keys: `identification_file`, `power_file`,
`pep_file`, `pep_file_template`.

## Path parameters

- `id` string, required

## Query parameters

- `file_name` 'identification_file' | 'power_file' | 'pep_file' | 'pep_file_template', required

## Parameters

- `#/paths/~1v1~1users/get/parameters/0` (unresolved $ref)

## Response `200`

Presigned URL for the requested file.

- object
  - `url` string, uri

## Other responses

- `401`: Unauthorized
- `404`: Membership not found
- `412`: `file_name` query parameter is missing.
- `422`: The `file_name` is not an allowed attachment key (`attachment/file_name_not_allowed`), the attachment is not present (`attachment/file_not_attached`), or the attachment record exists but its underlying blob is missing from storage (`attachment/blob_missing`).

---

[API](https://skmtc.dev/cardda/apis/banking-api.md) - [All operations](https://skmtc.dev/cardda/apis/banking-api/llms.txt) - [OpenAPI document](https://skmtc.dev/cardda/apis/banking-api/revisions/ff1aeb3fda8b?raw)
