Access Tokens

    EndpointDescription
    POST /v1/access_tokensCreates a new access token
    POST /v1/access_tokens/deleteRequests an access token deletion
    DELETE /v1/access_tokensDeletes an access token

    POST /v1/access_tokens

    Creates a new access token

    Request Parameters

    Location Name Type Required? Description
    body data object ✔️
    body data.type string ✔️ Type of data. Must be "access_tokens".
    body data.attributes object ✔️
    body data.attributes.email_address string ✔️ Email address to send access token to.

    Example Request

    Header:

    POST /v1/access_tokens
    Host: api.pkmnapi.com
    Content-Type: application/json
    

    Body:

    {
        "data": {
            "type": "access_tokens",
            "attributes": {
                "email_address": "your@email.com"
            }
        }
    }
    

    Response Parameters

    None

    Example Response

    Header:

    HTTP/1.1 201 Created
    Content-Type: application/json
    Location: https://api.pkmnapi.com/v1/access_tokens
    Server: pkmnapi/0.1.0
    

    Body:

    {}
    

    POST /v1/access_tokens/delete

    Requests an access token deletion

    Request Parameters

    Location Name Type Required? Description
    body data object ✔️
    body data.type string ✔️ Type of data. Must be "access_tokens".
    body data.attributes object ✔️
    body data.attributes.email_address string ✔️ Email address to send access token delete confirmation to.

    Example Request

    Header:

    POST /v1/access_tokens/delete
    Host: api.pkmnapi.com
    Content-Type: application/json
    

    Body:

    {
        "data": {
            "type": "access_tokens",
            "attributes": {
                "email_address": "your@email.com"
            }
        }
    }
    

    Response Parameters

    None

    Example Response

    Header:

    HTTP/1.1 201 Created
    Content-Type: application/json
    Location: https://api.pkmnapi.com/v1/access_tokens
    Server: pkmnapi/0.1.0
    

    Body:

    {}
    

    DELETE /v1/access_tokens

    Deletes an access token

    Request Parameters

    Location Name Type Required? Description
    body data object ✔️
    body data.type string ✔️ Type of data. Must be "access_tokens".
    body data.attributes object ✔️
    body data.attributes.code string ✔️ Code sent to the user's email address.
    body data.attributes.email_address string ✔️ Email address to delete access token for.

    Example Request

    Header:

    DELETE /v1/access_tokens
    Host: api.pkmnapi.com
    Content-Type: application/json
    

    Body:

    {
        "data": {
            "type": "access_tokens",
            "attributes": {
                "code": "1337",
                "email_address": "your@email.com"
            }
        }
    }
    

    Response Parameters

    None

    Example Response

    Header:

    HTTP/1.1 204 No Content
    Content-Type: application/json
    Server: pkmnapi/0.1.0
    

    Body:

    {}