Create membership

post
/memberships

Create a new membership

account
object
required
email
string
required

Email ID, which should be registered with AfterShip already.

>= 1 characters
role
object
required
code
string
required

Code of a role. Unique in the organization.

>= 1 characters

Created

meta
Meta

Meta data object.

Example:
{"code":200,"type":"OK","message":"Everything worked as expected."}
code
number
required
Default:
200
Example:
200
type
string
required
>= 1 characters
message
string
required
>= 1 characters
errors
array[Error]

Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.

data
Membership

Object describes membership information.

id
string
required
>= 1 characters
organization
object
required
account
object
required
role
Role
required

Object describes role information.

Bad Request

meta
Meta

Meta data object.

Example:
{"code":200,"type":"OK","message":"Everything worked as expected."}
code
number
required
Default:
200
Example:
200
type
string
required
>= 1 characters
message
string
required
>= 1 characters
errors
array[Error]

Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.

data
object

Unauthorized

meta
Meta

Meta data object.

Example:
{"code":200,"type":"OK","message":"Everything worked as expected."}
code
number
required
Default:
200
Example:
200
type
string
required
>= 1 characters
message
string
required
>= 1 characters
errors
array[Error]

Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.

data
object

Conflict

meta
Meta

Meta data object.

Example:
{"code":200,"type":"OK","message":"Everything worked as expected."}
code
number
required
Default:
200
Example:
200
type
string
required
>= 1 characters
message
string
required
>= 1 characters
errors
array[Error]

Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.

data
object

Unprocessable Entity (WebDAV)

meta
Meta

Meta data object.

Example:
{"code":200,"type":"OK","message":"Everything worked as expected."}
code
number
required
Default:
200
Example:
200
type
string
required
>= 1 characters
message
string
required
>= 1 characters
errors
array[Error]

Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.

data
object

Internal Server Error

meta
Meta

Meta data object.

Example:
{"code":200,"type":"OK","message":"Everything worked as expected."}
code
number
required
Default:
200
Example:
200
type
string
required
>= 1 characters
message
string
required
>= 1 characters
errors
array[Error]

Each error object contains a "path" key and an "info" key. The "path" is the JSON path of the request object to indicate the error location. The "info" is a human-readable description of the error.

data
object
Auth
:
Body
{ "account": { "email": "[email protected]" }, "role": { "code": "admin" } }
Response Example
{ "meta": { "code": 201, "type": "Created", "message": "The request was successful, we created a new resource and the response body contains the representation." }, "data": { "id": "4a6091f28bf645a09246899722ce8a21", "organization": { "id": "511ceb52969b400a93e3422c743ae34a" }, "account": { "id": "74d998151a1b4668bee5a283712dd57e", "email": "[email protected]" }, "role": { "code": "admin", "name": "Admin" } } }