> ## Documentation Index
> Fetch the complete documentation index at: https://www.dropfans.io/developers/llms.txt
> Use this file to discover all available pages before exploring further.

# POST /api/external/agency/invites — Invite a creator to your agency

> Creates a join link that invites a real creator to be managed by the agency. The link is valid for 72 hours; with `email`, Dropfans also emails it.

- Source: https://www.dropfans.io/developers/reference/create-agency-invite
- Section: API reference
- OpenAPI: https://www.dropfans.io/developers/openapi.json

Creates a join link that invites a real creator to be managed by the agency. The link is valid for 72 hours; with `email`, Dropfans also emails it.

The creator accepts while signed in to their own Dropfans account and agrees to the agency's permissions there — an agency can never attach a creator without their consent. Once accepted, the creator shows up in [GET /api/external/agency/creators](https://www.dropfans.io/developers/reference/list-agency-creators.md).

## Authentication

`Authorization: Bearer dpfn_...` — an API key generated in the dashboard (Vault → API Connect). By default the key acts for the one account it belongs to. Missing or invalid keys return 401 `{"error":"Unauthorized","code":"unauthorized"}`.

Needs a verified agency's own key, sent without `X-Dropfans-Account` — these endpoints act as the agency itself.

## Request body (application/json)

| Field | Type | Required | Description |
|---|---|---|---|
| `email` | string |  | Optional: Dropfans emails the link to this address. |
| `message` | string |  | Optional personal note shown with the invite (longer text is cut at 500 characters). |

Example — Email an invite:

```json
{
  "email": "valeria@example.com",
  "message": "Hi Valeria — excited to work with you!"
}
```

## Responses

### 201

The invite.

| Field | Type | Required | Description |
|---|---|---|---|
| `inviteId` | string | yes | The invite’s id. |
| `inviteLink` | string | yes | Join link for the creator. They accept while signed in to their own Dropfans account. |
| `expiresAt` | string | yes | When the link stops working (72 hours after creation). |
| `emailSent` | boolean | yes | True when Dropfans emailed the link to `email`. |
| `emailError` | string |  | Present when `email` was given but sending failed — the invite still exists; share `inviteLink` yourself. |

```json
{
  "inviteId": "cmh5inv0001ab7k2p9q4r8s",
  "inviteLink": "https://www.dropfans.io/agency/join/3f9c…",
  "expiresAt": "2026-10-29T12:00:00.000Z",
  "emailSent": true
}
```

## Errors

| Status | Body | When |
|---|---|---|
| 400 | `{"error":"Agency endpoints act as the agency itself — send them without X-Dropfans-Account.","code":"account_header_not_allowed"}` | The request carried `X-Dropfans-Account`. Agency endpoints always act as the agency. |
| 401 | `{"error":"Unauthorized","code":"unauthorized"}` | Missing or invalid API key. |
| 403 | `{"error":"This endpoint needs a verified agency's own API key.","code":"agency_key_required"}` | The key is not a verified agency’s own key — a creator’s key, or a key an agency minted for one of its creators. |
| 400 | `{"error":"email is not a valid address","code":"invalid_email"}` | Malformed `email`. |
| 400 | `{"error":"Invalid JSON body"}` | The body is not valid JSON. |

## Notes

When the email fails to send, the call still returns 201 with `emailSent: false` and an `emailError` — share `inviteLink` yourself.

## Rate limiting

Per-key fixed windows by tier (Personal 60/min · 5,000/day; approved apps 300/min · 50,000/day; Dropfans-operated integrations exempt). Read the live values from X-RateLimit-Tier, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset and their -Day variants; a 429 carries Retry-After and `{"error":"Rate limit exceeded","code":"rate_limited"}`. See [Rate limits](https://www.dropfans.io/developers/concepts/rate-limits.md).

## Code samples

### curl

```bash
curl -X POST "https://www.dropfans.io/api/external/agency/invites" \
  -H "Authorization: Bearer $DROPFANS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "email": "valeria@example.com",
  "message": "Hi Valeria — excited to work with you!"
}'
```

### Node

```javascript
const res = await fetch(`https://www.dropfans.io/api/external/agency/invites`, {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.DROPFANS_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "email": "valeria@example.com",
    "message": "Hi Valeria — excited to work with you!"
  }),
});
console.log(await res.json());
```

### Python

```python
import os
import requests

res = requests.post(
    "https://www.dropfans.io/api/external/agency/invites",
    headers={"Authorization": f"Bearer {os.environ['DROPFANS_API_KEY']}"},
    json={
        "email": "valeria@example.com",
        "message": "Hi Valeria — excited to work with you!",
    },
)
print(res.json())
```

## OpenAPI

```json
{
  "method": "POST",
  "path": "/api/external/agency/invites",
  "operationId": "createAgencyInvite",
  "tags": [
    "agency"
  ],
  "summary": "Invite a creator to your agency",
  "description": "Creates a join link that invites a real creator to be managed by the agency. The link is valid for 72 hours; with `email`, Dropfans also emails it.\n\nThe creator accepts while signed in to their own Dropfans account and agrees to the agency's permissions there — an agency can never attach a creator without their consent. Once accepted, the creator shows up in [GET /api/external/agency/creators](https://www.dropfans.io/developers/reference/list-agency-creators.md).",
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "email": {
              "type": "string",
              "description": "Optional: Dropfans emails the link to this address.",
              "format": "email",
              "example": "valeria@example.com"
            },
            "message": {
              "type": "string",
              "description": "Optional personal note shown with the invite (longer text is cut at 500 characters).",
              "example": "Hi Valeria — excited to work with you!",
              "maxLength": 500
            }
          }
        },
        "examples": {
          "email": {
            "summary": "Email an invite",
            "value": {
              "email": "valeria@example.com",
              "message": "Hi Valeria — excited to work with you!"
            }
          }
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "The invite.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-Dropfans-Account": {
          "description": "The id of the account this request acted on — the key’s own account, or the managed account named in the X-Dropfans-Account request header. Assert it when acting for several accounts.",
          "schema": {
            "type": "string"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "inviteId": {
                "type": "string",
                "description": "The invite’s id."
              },
              "inviteLink": {
                "type": "string",
                "description": "Join link for the creator. They accept while signed in to their own Dropfans account.",
                "format": "uri"
              },
              "expiresAt": {
                "type": "string",
                "description": "When the link stops working (72 hours after creation).",
                "format": "date-time"
              },
              "emailSent": {
                "type": "boolean",
                "description": "True when Dropfans emailed the link to `email`."
              },
              "emailError": {
                "type": "string",
                "description": "Present when `email` was given but sending failed — the invite still exists; share `inviteLink` yourself."
              }
            },
            "required": [
              "inviteId",
              "inviteLink",
              "expiresAt",
              "emailSent"
            ]
          },
          "example": {
            "inviteId": "cmh5inv0001ab7k2p9q4r8s",
            "inviteLink": "https://www.dropfans.io/agency/join/3f9c…",
            "expiresAt": "2026-10-29T12:00:00.000Z",
            "emailSent": true
          }
        }
      }
    },
    "400": {
      "description": "The request carried `X-Dropfans-Account`. Agency endpoints always act as the agency. Also: Malformed `email`. Also: The body is not valid JSON.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, rate_limited, username_required, invalid_account_header, account_not_managed, permission_denied, account_header_not_allowed, agency_key_required — plus endpoint-specific codes listed on each reference page.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "Agency endpoints act as the agency itself — send them without X-Dropfans-Account.",
            "code": "account_header_not_allowed"
          }
        }
      }
    },
    "401": {
      "description": "Missing or invalid API key.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, rate_limited, username_required, invalid_account_header, account_not_managed, permission_denied, account_header_not_allowed, agency_key_required — plus endpoint-specific codes listed on each reference page.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "Unauthorized",
            "code": "unauthorized"
          }
        }
      }
    },
    "403": {
      "description": "The key is not a verified agency’s own key — a creator’s key, or a key an agency minted for one of its creators.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, rate_limited, username_required, invalid_account_header, account_not_managed, permission_denied, account_header_not_allowed, agency_key_required — plus endpoint-specific codes listed on each reference page.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "This endpoint needs a verified agency's own API key.",
            "code": "agency_key_required"
          }
        }
      }
    },
    "429": {
      "description": "Rate limit exceeded for the current minute or day window. Wait Retry-After seconds and retry.",
      "headers": {
        "X-RateLimit-Tier": {
          "description": "Rate-limit tier of the key: personal, app or first_party (first_party is unlimited).",
          "schema": {
            "type": "string",
            "enum": [
              "personal",
              "app",
              "first_party"
            ]
          }
        },
        "X-RateLimit-Limit": {
          "description": "Requests allowed per minute for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining": {
          "description": "Requests left in the current minute window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset": {
          "description": "Epoch seconds when the minute window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Limit-Day": {
          "description": "Requests allowed per UTC day for this key (absent on first_party).",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Remaining-Day": {
          "description": "Requests left in the current UTC day window.",
          "schema": {
            "type": "integer"
          }
        },
        "X-RateLimit-Reset-Day": {
          "description": "Epoch seconds when the day window resets.",
          "schema": {
            "type": "integer"
          }
        },
        "Retry-After": {
          "description": "Seconds to wait before retrying (sent with 429s).",
          "schema": {
            "type": "integer"
          }
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "string",
                "description": "Human-readable message.",
                "example": "Rate limit exceeded"
              },
              "code": {
                "type": "string",
                "description": "Machine-readable code: unauthorized, app_suspended, first_party_only, rate_limited, username_required, invalid_account_header, account_not_managed, permission_denied, account_header_not_allowed, agency_key_required — plus endpoint-specific codes listed on each reference page.",
                "example": "rate_limited"
              }
            },
            "required": [
              "error",
              "code"
            ]
          },
          "example": {
            "error": "Rate limit exceeded",
            "code": "rate_limited"
          }
        }
      }
    }
  },
  "x-codeSamples": [
    {
      "lang": "cURL",
      "label": "curl",
      "source": "curl -X POST \"https://www.dropfans.io/api/external/agency/invites\" \\\n  -H \"Authorization: Bearer $DROPFANS_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n  \"email\": \"valeria@example.com\",\n  \"message\": \"Hi Valeria — excited to work with you!\"\n}'"
    },
    {
      "lang": "JavaScript",
      "label": "Node",
      "source": "const res = await fetch(`https://www.dropfans.io/api/external/agency/invites`, {\n  method: 'POST',\n  headers: {\n    Authorization: `Bearer ${process.env.DROPFANS_API_KEY}`,\n    'Content-Type': 'application/json',\n  },\n  body: JSON.stringify({\n    \"email\": \"valeria@example.com\",\n    \"message\": \"Hi Valeria — excited to work with you!\"\n  }),\n});\nconsole.log(await res.json());"
    },
    {
      "lang": "Python",
      "source": "import os\nimport requests\n\nres = requests.post(\n    \"https://www.dropfans.io/api/external/agency/invites\",\n    headers={\"Authorization\": f\"Bearer {os.environ['DROPFANS_API_KEY']}\"},\n    json={\n        \"email\": \"valeria@example.com\",\n        \"message\": \"Hi Valeria — excited to work with you!\",\n    },\n)\nprint(res.json())"
    }
  ],
  "x-dropfans-docs": "https://www.dropfans.io/developers/reference/create-agency-invite"
}
```

---

Previous: [Reactivate a retired AI persona](https://www.dropfans.io/developers/reference/reactivate-persona.md) · Next: [Stop managing a creator](https://www.dropfans.io/developers/reference/end-management.md) · All pages: [llms.txt](https://www.dropfans.io/developers/llms.txt)
