NAME
OpenAPI::Client::OpenAI::Path::organization-invites - Documentation for the /organization/invites path.
OPERATIONS
GET /organization/invites
list-invites
$client->list_invites({
body => { ... },
});
Returns a list of invites in the organization.
Path/query parameters
limit(in query, optional, integer) - A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.Default: 20
after(in query, optional, string) - A cursor for use in pagination.afteris an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
Responses
200 - Invites listed successfully.
Content-Type: application/json
Example:
{
"data" : [
"{\n \"object\": \"organization.invite\",\n \"id\": \"invite-abc\",\n \"email\": \"user@example.com\",\n \"role\": \"owner\",\n \"status\": \"accepted\",\n \"created_at\": 1711471533,\n \"expires_at\": 1711471533,\n \"accepted_at\": 1711471533,\n \"projects\": [\n {\n \"id\": \"project-xyz\",\n \"role\": \"member\"\n }\n ]\n}\n"
],
"first_id" : "string",
"has_more" : false,
"last_id" : "string",
"object" : "list"
}
POST /organization/invites
inviteUser
$client->invite_user({
body => { ... },
});
Create an invite for a user to the organization. The invite must be accepted by the user before they have access to the organization.
Responses
200 - User invited successfully.
Content-Type: application/json
Example:
{
"accepted_at" : 1711471533,
"created_at" : 1711471533,
"email" : "user@example.com",
"expires_at" : 1711471533,
"id" : "invite-abc",
"object" : "organization.invite",
"projects" : [
{
"id" : "project-xyz",
"role" : "member"
}
],
"role" : "owner",
"status" : "accepted"
}
SCHEMAS
Invite
Properties:
accepted_at(anyOf) - The Unix timestamp (in seconds) of when the invite was accepted.created_at(integer, required) - The Unix timestamp (in seconds) of when the invite was sent.email(string, required) - The email address of the individual to whom the invite was sentexpires_at(anyOf) - The Unix timestamp (in seconds) of when the invite expires.id(string, required) - The identifier, which can be referenced in API endpointsobject(string, required) - The object type, which is alwaysorganization.inviteAllowed values: organization.invite
projects(array of object, required) - The projects that were granted membership upon acceptance of the invite.role(string, required) -ownerorreaderAllowed values: owner, reader
status(string, required) -accepted,expired, orpendingAllowed values: accepted, expired, pending
InviteListResponse
Properties:
data(array of Invite, required)first_id(anyOf) - The firstinvite_idin the retrievedlisthas_more(boolean, required) - Thehas_moreproperty is used for pagination to indicate there are additional results.last_id(anyOf) - The lastinvite_idin the retrievedlistobject(string, required) - The object type, which is alwayslistAllowed values: list
InviteRequest
Properties:
email(string, required) - Send an email to this addressprojects(array of object) - An array of projects to which membership is granted at the same time the org invite is accepted. If omitted, the user will be invited to the default project for compatibility with legacy behavior. If empty list is passed, the user will not be invited to any projects, including the default one.role(string, required) -ownerorreaderAllowed values: reader, owner
SEE ALSO
COPYRIGHT AND LICENSE
Copyright (C) 2023-2026 by Nelson Ferraz
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.