Create an Account Membership
POST/v2/accounts/:accountID/account-memberships
You can only create up to 1000 account memberships in an account.
Request
Path Parameters
The unique identifier of the account that the account is associated with.
- application/json
Body
data AccountMembership
Specifies the unique identifier of the account member that the membership is associated with.
Default value: account_membership
Specifies the type of the object. Set this value to account_membership
.
Responses
- 201
- 404
- 409
- default
Created
- application/json
- Schema
- Example (from schema)
Schema
data AccountMembershipResponse
Represents the unique identifier for the account membership.
Default value: account_membership
Represents the type of the object returned.
meta object
timestamps object
The date the account is created.
The date the account is updated.
relationships object
account_member object
data object
Specifies the ID of the account member.
Default value: account_member
Specifies the type of the account member.
links object
A URL to the specific resource.
{
"data": {
"id": "24e939f6-178f-497b-9d64-5bf2b5a70a2e",
"type": "account_membership",
"meta": {
"timestamps": {
"created_at": "2021-02-23T09:40:33.882Z",
"updated_at": "2021-02-23T09:40:33.882Z"
}
},
"relationships": {
"account_member": {
"data": {
"id": "908f7849-60da-4e4a-a3b1-51d4cbe3b953",
"type": "account_member"
}
}
},
"links": {
"self": "https://useast.api.elasticpath.com/v2/accounts/5b495058-9ffc-4b9b-810a-c9d43ffc6500/account-memberships/24e939f6-178f-497b-9d64-5bf2b5a70a2e"
}
}
}
Not Found
- application/json
- Schema
- Example (from schema)
- not-found-error
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
{
"errors": [
{
"title": "Not Found",
"status": "404",
"detail": "account not found"
}
]
}
Conflict
- application/json
- Schema
- Example (from schema)
- conflict-error
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
{
"errors": [
{
"title": "Conflict",
"status": "409",
"detail": "account membership with the given account id and account member id already exists"
}
]
}
Internal server error.
- application/json
- Schema
- Example (from schema)
- internal-server-error
Schema
- Array [
- ]
errors Error[]required
A brief summary of the error.
The HTTP response code of the error.
Optional additional detail about the error.
{
"errors": [
{
"title": "string",
"status": "string",
"detail": "string"
}
]
}
Internal server error
{
"errors": [
{
"title": "Internal Server Error",
"status": "500",
"detail": "there was a problem processing your request"
}
]
}