# Account API reference

> Who the API key belongs to and how many credits are left.

Source: https://signwith.co/docs/api/account · Updated 2026-10-02

## Get the current API key's user and account

`GET https://app.signwith.co/api/v1/me`

Read-only keys can call this.

Returns the user and account the API key acts as, the environment (`live` or `test`) and
details of the key itself. Call it when setting up an integration to check you're using the
right key, or as a cheap health check for your stored credentials.

### Request sample

cURL:

```bash
curl https://app.signwith.co/api/v1/me \
  -H "Authorization: Bearer $SIGNWITH_API_KEY"
```

Node:

```javascript
const response = await fetch('https://app.signwith.co/api/v1/me', {
  headers: {
    Authorization: `Bearer ${process.env.SIGNWITH_API_KEY}`,
  },
})

console.log(response.status, await response.json())
```

Python:

```python
import os

import requests

response = requests.get(
    "https://app.signwith.co/api/v1/me",
    headers={
        "Authorization": f"Bearer {os.environ['SIGNWITH_API_KEY']}",
    },
)

print(response.status_code, response.json())
```

### Response 200

The key's user, account and environment.

```json
{
  "object": "me",
  "user": {
    "id": 42,
    "email": "ada@acme.co",
    "name": "Ada Lovelace"
  },
  "account": {
    "id": 7,
    "name": "Acme Inc."
  },
  "environment": "live",
  "api_key": {
    "id": 118,
    "name": "Production CRM",
    "permission": "full",
    "expires_at": null
  }
}
```

### Errors

| Status | Meaning |
| --- | --- |
| 401 | The API key is missing, invalid or expired, or its account has been archived. |
| 429 | Rate limit exceeded (`rate_limited`, with `Retry-After`); more than 20 `POST /feedback` messages in an hour (`rate_limited`, with `Retry-After`: seconds until the next clock hour); or — for `POST /signature_requests/{id}/remind` — signers were reminded less than an hour ago (`remind_too_soon`, with `Retry-After`).  |
| 500 | Something went wrong on SignWith's side. It's safe to retry with the same `Idempotency-Key`. |

## Get the credit balance

`GET https://app.signwith.co/api/v1/credits`

Read-only keys can call this.

Returns how many credits the key's user has and whether they can send another document.
One credit per signed document: a document (template) uses a credit the first time it is
signed; sending the same document again doesn't use another. Check `can_send` before creating signature
requests in bulk so you can prompt users to top up instead of hitting `402 insufficient_credits`.
Users on a lifetime plan have `unlimited: true` and `available: null`. To buy more credits
from the API see [`GET /credit_packs`](#operation/listCreditPacks); `purchase_url` is the
equivalent page in the SignWith dashboard.

### Request sample

cURL:

```bash
curl https://app.signwith.co/api/v1/credits \
  -H "Authorization: Bearer $SIGNWITH_API_KEY"
```

Node:

```javascript
const response = await fetch('https://app.signwith.co/api/v1/credits', {
  headers: {
    Authorization: `Bearer ${process.env.SIGNWITH_API_KEY}`,
  },
})

console.log(response.status, await response.json())
```

Python:

```python
import os

import requests

response = requests.get(
    "https://app.signwith.co/api/v1/credits",
    headers={
        "Authorization": f"Bearer {os.environ['SIGNWITH_API_KEY']}",
    },
)

print(response.status_code, response.json())
```

### Response 200

The credit balance.

```json
{
  "object": "credits",
  "unlimited": false,
  "available": 12,
  "overdraft_limit": -3,
  "can_send": true,
  "billing": "One credit per signed document: a document (template) uses a credit the first time it is signed; sending the same document again doesn't use another.",
  "purchase_url": "https://app.signwith.co/credit_plans"
}
```

```json
{
  "object": "credits",
  "unlimited": true,
  "available": null,
  "overdraft_limit": -3,
  "can_send": true,
  "billing": "One credit per signed document: a document (template) uses a credit the first time it is signed; sending the same document again doesn't use another.",
  "purchase_url": "https://app.signwith.co/credit_plans"
}
```

### Errors

| Status | Meaning |
| --- | --- |
| 401 | The API key is missing, invalid or expired, or its account has been archived. |
| 429 | Rate limit exceeded (`rate_limited`, with `Retry-After`); more than 20 `POST /feedback` messages in an hour (`rate_limited`, with `Retry-After`: seconds until the next clock hour); or — for `POST /signature_requests/{id}/remind` — signers were reminded less than an hour ago (`remind_too_soon`, with `Retry-After`).  |
| 500 | Something went wrong on SignWith's side. It's safe to retry with the same `Idempotency-Key`. |

## The me object

Anchor: https://signwith.co/docs/api/account#the-me-object

- `object` (string, required, always `me`).
- `user` (object, required). A SignWith user (a member of your team).
  - `id` (integer, required).
  - `email` (string, required, email address).
  - `name` (string or null, required). First and last name, or `null` if not set.
- `account` (object, required).
  - `id` (integer, required).
  - `name` (string or null, required).
- `environment` (string, required, one of `live`, `test`). `test` for keys issued from your test account (`sw_test_`), otherwise `live`.
- `api_key` (object, required).
  - `id` (integer, required).
  - `name` (string, required). The name you gave the key, or `Default key`.
  - `permission` (string, required, one of `full`, `read`). `read` keys can only call `GET` endpoints, `POST /documents/verify` and `POST /feedback`.
  - `expires_at` (string (date-time) or null, required). When the key stops working, or `null` if it never expires.

## The credits object

Anchor: https://signwith.co/docs/api/account#the-credits-object

- `object` (string, required, always `credits`).
- `unlimited` (boolean, required). `true` for lifetime plans, which never run out of credits.
- `available` (integer or null, required). Credits left. Can be slightly negative (see `overdraft_limit`). `null` when `unlimited`.
- `overdraft_limit` (integer, required). How far below zero the balance may go before sending is blocked.
- `can_send` (boolean, required). Whether a signature request that needs a new credit can be sent right now.
- `billing` (string, required). Plain-language summary of how credits are used.
- `purchase_url` (string, required, URL). Page in the SignWith dashboard where the user can buy credits. To buy from the API instead, use `GET /credit_packs` and `POST /checkouts`.
