Skip to content
grepvine.aiJoin preview

Register a local user

POST
/auth/register
Code sample: Shell / cURL
curl --request POST \
--url https://api.grepvine.ai/v1/auth/register \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "email": "hello@example.com", "password": "example", "invitation": "example" }'

A 409 has code username_taken when an account or an organization already holds the username, and code email_taken when an account already uses the email address. A 403 has code invitation_required when registration is by invitation and the request carries none, and code invitation_invalid when the invitation it carries was already used, was withdrawn or has expired. A valid invitation is accepted with the registration, and the account joins the organization it names, if any.

Media typeapplication/json
object
name
required

An account or organization name. Accounts and organizations share one namespace. A name keeps the case it was created with, and any spelling that differs only in case refers to it; no other account or organization can take such a spelling.

string
/^[A-Za-z][A-Za-z0-9-]{2,62}$/
email
required
string format: email
<= 320 characters
password
required
string
>= 12 characters <= 1024 characters
invitation

The token of the invitation link the account was invited with. Required when registration is by invitation.

string
>= 1 characters <= 256 characters

Example generated

{
"name": "example",
"email": "hello@example.com",
"password": "example",
"invitation": "example"
}

The user and session were created.

Media typeapplication/json
object
id
required
string format: uuid
name
required

An account or organization name. Accounts and organizations share one namespace. A name keeps the case it was created with, and any spelling that differs only in case refers to it; no other account or organization can take such a spelling.

string
/^[A-Za-z][A-Za-z0-9-]{2,62}$/
email
required
string format: email
created_at
required
string format: date-time
staff_role

The account’s role on the Grepvine team, when it has one. Omitted for every other account.

string
Allowed values: root support

Example

{
"staff_role": "root"
}
X-Csrf-Token
string

The token for state changes that use cookie authentication.

Set-Cookie
string

The secure opaque session cookie, or an expired cookie when the session is cleared.

The request is not permitted.

Media typeapplication/json
object
code
required
string
reason
required
string
error
required
string

Example generated

{
"code": "example",
"reason": "example",
"error": "example"
}
X-Request-Id
string

The request identifier used for support and audit correlation.

The request conflicts with current state.

Media typeapplication/json
object
code
required
string
reason
required
string
error
required
string

Example generated

{
"code": "example",
"reason": "example",
"error": "example"
}
X-Request-Id
string

The request identifier used for support and audit correlation.

The request failed. A 429 carries Retry-After; the index is busy absorbing recent writes or is out of request capacity, and clients must slow down and retry after the interval. A 403 with code organization_suspended refuses every operation on a suspended organization’s members, indexes, documents and searches; reading the organization itself still answers and reports suspended, and the client should contact support.

Media typeapplication/json
object
code
required
string
reason
required
string
error
required
string

Example generated

{
"code": "example",
"reason": "example",
"error": "example"
}
X-Request-Id
string

The request identifier used for support and audit correlation.

Retry-After
integer

Seconds to wait before retrying. Sent with every 429 so a client slows down instead of failing.