Skip to content

Signup Invites Endpoints

Signup Invites API endpoints.


Overview

Method Endpoint Description
POST /api/v1/signup-invites/ Create Signup Invite
GET /api/v1/signup-invites/ List Signup Invites
POST /api/v1/signup-invites/redeem Redeem Signup Invite
GET /api/v1/signup-invites/validate/{token} Validate Signup Invite
POST /api/v1/signup-invites/{invite_id}/revoke Revoke Signup Invite

API Reference

Sartiq Backend Server - Signup Invites 0.1.0

signup-invites


POST /api/v1/signup-invites/

Create Signup Invite

Description

Mint a signup invite. The returned url is shown only once.

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No

Request body

{
    "email": "derp@meme.org",
    "organization_id": "e141397b-ee6c-492e-9922-e7db28015a58",
    "role_id": null,
    "expires_in_hours": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
        },
        "organization_id": {
            "type": "string",
            "format": "uuid",
            "title": "Organization Id"
        },
        "role_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Role Id"
        },
        "expires_in_hours": {
            "anyOf": [
                {
                    "type": "integer",
                    "maximum": 720.0,
                    "exclusiveMinimum": 0.0
                },
                {
                    "type": "null"
                }
            ],
            "title": "Expires In Hours"
        }
    },
    "type": "object",
    "required": [
        "email",
        "organization_id"
    ],
    "title": "SignupInviteCreate",
    "description": "Admin mint request. Organization is pre-bound; role defaults to OPERATOR."
}

Responses

{
    "invite": {
        "id": "75f4528f-f606-4778-9fce-94a30591e4ac",
        "email": "derp@meme.org",
        "organization_id": null,
        "role_id": null,
        "created_by_id": null,
        "created_user_id": null,
        "expires_at": "2022-04-13T15:42:05.901Z",
        "used_at": null,
        "revoked_at": null,
        "created_at": "2022-04-13T15:42:05.901Z",
        "status": "PENDING"
    },
    "token": "string",
    "url": "string"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "invite": {
            "$ref": "#/components/schemas/SignupInvitePublic"
        },
        "token": {
            "type": "string",
            "title": "Token"
        },
        "url": {
            "type": "string",
            "title": "Url"
        }
    },
    "type": "object",
    "required": [
        "invite",
        "token",
        "url"
    ],
    "title": "SignupInviteTokenPublic",
    "description": "Mint response — carries the signup URL exactly once (like an API key)."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/signup-invites/

List Signup Invites

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
limit query integer 100 No
skip query integer 0 No

Responses

{
    "data": [
        {
            "id": "8245cb81-2e34-4068-bd90-3d93170c936e",
            "email": "derp@meme.org",
            "organization_id": null,
            "role_id": null,
            "created_by_id": null,
            "created_user_id": null,
            "expires_at": "2022-04-13T15:42:05.901Z",
            "used_at": null,
            "revoked_at": null,
            "created_at": "2022-04-13T15:42:05.901Z",
            "status": "PENDING"
        }
    ],
    "count": 0
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "data": {
            "items": {
                "$ref": "#/components/schemas/SignupInvitePublic"
            },
            "type": "array",
            "title": "Data"
        },
        "count": {
            "type": "integer",
            "title": "Count"
        }
    },
    "type": "object",
    "required": [
        "data",
        "count"
    ],
    "title": "SignupInvitesPublic"
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/signup-invites/{invite_id}/revoke

Revoke Signup Invite

Input parameters

Parameter In Type Default Nullable Description
OAuth2PasswordBearer header string N/A No
invite_id path string No

Responses

{
    "id": "14c623e4-a919-4c54-a53a-abb7091b90f7",
    "email": "derp@meme.org",
    "organization_id": null,
    "role_id": null,
    "created_by_id": null,
    "created_user_id": null,
    "expires_at": "2022-04-13T15:42:05.901Z",
    "used_at": null,
    "revoked_at": null,
    "created_at": "2022-04-13T15:42:05.901Z",
    "status": "PENDING"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "id": {
            "type": "string",
            "format": "uuid",
            "title": "Id"
        },
        "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "role_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Role Id"
        },
        "created_by_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Created By Id"
        },
        "created_user_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Created User Id"
        },
        "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
        },
        "used_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Used At"
        },
        "revoked_at": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "date-time"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Revoked At"
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created At"
        },
        "status": {
            "$ref": "#/components/schemas/SignupInviteStatus"
        }
    },
    "type": "object",
    "required": [
        "id",
        "email",
        "organization_id",
        "role_id",
        "created_by_id",
        "created_user_id",
        "expires_at",
        "used_at",
        "revoked_at",
        "created_at",
        "status"
    ],
    "title": "SignupInvitePublic",
    "description": "Admin-facing view of an invite (never includes the raw token)."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

GET /api/v1/signup-invites/validate/{token}

Validate Signup Invite

Description

Non-consuming check used to render the public redeem page.

Input parameters

Parameter In Type Default Nullable Description
token path string No

Responses

{
    "email": "derp@meme.org",
    "organization_id": null,
    "organization_name": null,
    "expires_at": "2022-04-13T15:42:05.901Z"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
        },
        "organization_id": {
            "anyOf": [
                {
                    "type": "string",
                    "format": "uuid"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Id"
        },
        "organization_name": {
            "anyOf": [
                {
                    "type": "string"
                },
                {
                    "type": "null"
                }
            ],
            "title": "Organization Name"
        },
        "expires_at": {
            "type": "string",
            "format": "date-time",
            "title": "Expires At"
        }
    },
    "type": "object",
    "required": [
        "email",
        "organization_id",
        "organization_name",
        "expires_at"
    ],
    "title": "SignupInviteValidatePublic",
    "description": "Non-consuming check used to render the public redeem page."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

POST /api/v1/signup-invites/redeem

Redeem Signup Invite

Description

Consume the invite, create the account, and return an access token.

Request body

{
    "token": "string",
    "password": "string",
    "full_name": null
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the request body
{
    "properties": {
        "token": {
            "type": "string",
            "title": "Token"
        },
        "password": {
            "type": "string",
            "maxLength": 40,
            "minLength": 8,
            "title": "Password"
        },
        "full_name": {
            "anyOf": [
                {
                    "type": "string",
                    "maxLength": 255
                },
                {
                    "type": "null"
                }
            ],
            "title": "Full Name"
        }
    },
    "type": "object",
    "required": [
        "token",
        "password"
    ],
    "title": "SignupRedeemRequest"
}

Responses

{
    "access_token": "string",
    "token_type": "string",
    "user_id": "f0c12241-6b49-456b-99ba-23b5e23ca710",
    "email": "derp@meme.org"
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "access_token": {
            "type": "string",
            "title": "Access Token"
        },
        "token_type": {
            "type": "string",
            "title": "Token Type",
            "default": "bearer"
        },
        "user_id": {
            "type": "string",
            "format": "uuid",
            "title": "User Id"
        },
        "email": {
            "type": "string",
            "format": "email",
            "title": "Email"
        }
    },
    "type": "object",
    "required": [
        "access_token",
        "user_id",
        "email"
    ],
    "title": "SignupRedeemResponse",
    "description": "Auto-login payload returned on successful redemption."
}

{
    "detail": [
        {
            "loc": [
                null
            ],
            "msg": "string",
            "type": "string",
            "input": null,
            "ctx": {}
        }
    ]
}
⚠️ This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.

Schema of the response body
{
    "properties": {
        "detail": {
            "items": {
                "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
        }
    },
    "type": "object",
    "title": "HTTPValidationError"
}

Schemas

HTTPValidationError

Name Type Description
detail Array<ValidationError>

SignupInviteCreate

Name Type Description
email string()
expires_in_hours
organization_id string(uuid)
role_id

SignupInvitePublic

Name Type Description
created_at string(date-time)
created_by_id
created_user_id
email string()
expires_at string(date-time)
id string(uuid)
organization_id
revoked_at
role_id
status SignupInviteStatus
used_at

SignupInvitesPublic

Name Type Description
count integer
data Array<SignupInvitePublic>

SignupInviteStatus

Type: string

SignupInviteTokenPublic

Name Type Description
invite SignupInvitePublic
token string
url string

SignupInviteValidatePublic

Name Type Description
email string()
expires_at string(date-time)
organization_id
organization_name

SignupRedeemRequest

Name Type Description
full_name
password string
token string

SignupRedeemResponse

Name Type Description
access_token string
email string()
token_type string
user_id string(uuid)

ValidationError

Name Type Description
ctx
input
loc Array<>
msg string
type string

Security schemes

Name Type Scheme Description
OAuth2PasswordBearer oauth2