Overview
POST
/team/membersteamAdd a member to a team by email
Create a record in members.
Auth: bearerAuth — calls run as the authenticated user.
Request body
application/json · optional
- teamIdstring
- emailstring
- roleoptionalstring
Example
{
"teamId": "string",
"email": "string",
"role": "string"
}Responses
201
Added member
- idstring
- teamIdstring
- memberKind"customer" | "persona"
which principal userId names — 'customer' (customer.customers) or 'persona' (persona.personas). Present on every response: GET list rows, the add-persona 201, and the by-email add 201 (always a customer).
- userIdstring
the member principal id — a customer id, or a persona id when memberKind is 'persona'
- rolestring
- addedAtstring
- emailoptionalstring?
the member's email (resolved; null for a persona member or a foreign customer)
- displayNameoptionalstring?
- personaSlugoptionalstring?
the persona's slug when memberKind is 'persona' (null for a customer member)
- personaNameoptionalstring?
Example
{
"id": "string",
"teamId": "string",
"memberKind": "customer",
"userId": "string",
"role": "string",
"addedAt": "string",
"email": "string",
"displayName": "string",
"personaSlug": "string",
"personaName": "string"
}400
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}401
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}404
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}409
Error
- erroroptionalobject
Example
{
"error": {
"message": "string",
"code": "string"
}
}Code examples
cURL
curl -X POST "https://api.agenticdeveloperhub.com/team/members" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"teamId": "string",
"email": "string",
"role": "string"
}'JavaScript
const res = await fetch("https://api.agenticdeveloperhub.com/team/members", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: "{\n \"teamId\": \"string\",\n \"email\": \"string\",\n \"role\": \"string\"\n}",
});
const data = await res.json();