Find or Create Invite
    • Dark
      Light
    • PDF

    Find or Create Invite

    • Dark
      Light
    • PDF

    Article summary

    Post
    /api/v1/findOrCreateInvite

    Creates or return an existing invite with the specified parameters.

    Permission required: create-invite-links

    Header parameters
    X-Auth-Token
    stringRequired

    The authToken of the authenticated user.

    ExampleRScctEHSmLGZGywfIhWyRpyofhKOiMoUIpimhvheU3f
    X-User-Id
    stringRequired

    The userId of the authenticated user.

    ExamplerbAXPnMktTFbNpwtJ
    Body parameters
    Example
    {
      "rid": "csFYrDeixJG7PnrAh",
      "days": 10,
      "maxUses": 0
    }
    object
    rid
    string Required

    The room ID that the invite is being created for.

    days
    integer Required

    The number of days that the invite will be valid for. Send 0 for unlimited.

    maxUses
    integer Required

    The number of times that the invite can be used. Send 0 for unlimited.

    Responses
    200

    OK

    Success
    [
      {
        "_id": "kDKQ3H",
        "days": 1,
        "maxUses": 1,
        "rid": "s7CE842q9WtvLctD7",
        "userId": "sNiDqHit5nGAGFg8X",
        "createdAt": "2019-12-20T03:31:56.774Z",
        "expires": "2019-12-21T03:31:56.774Z",
        "uses": 1,
        "_updatedAt": "2019-12-20T03:33:40.065Z"
      },
      {
        "_id": "99ScEP",
        "days": 1,
        "maxUses": 0,
        "rid": "s7CE842q9WtvLctD7",
        "userId": "sNiDqHit5nGAGFg8X",
        "createdAt": "2019-12-20T03:38:20.485Z",
        "expires": "2019-12-21T03:38:20.485Z",
        "uses": 0,
        "_updatedAt": "2019-12-20T03:38:20.485Z"
      },
      {
        "_id": "Y5JKM4",
        "days": 0,
        "maxUses": 1,
        "rid": "s7CE842q9WtvLctD7",
        "userId": "sNiDqHit5nGAGFg8X",
        "createdAt": "2019-12-20T03:38:25.313Z",
        "expires": null,
        "uses": 1,
        "_updatedAt": "2019-12-20T03:38:40.116Z"
      }
    ]
    Array of object
    object
    _id
    string
    days
    integer
    maxUses
    integer
    rid
    string
    userId
    string
    createdAt
    string
    expires
    string | null
    uses
    integer
    _updatedAt
    string
    401

    Unauthorized

    Authorization Error
    {
      "status": "error",
      "message": "You must be logged in to do this."
    }
    object
    status
    string
    message
    string

    Was this article helpful?

    What's Next
    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.