Organizations
Create an organization
Creates a new organization under the current billing account and returns it. Use this endpoint to create an organization through the Samva email API.
POST
Creates a new organization under the current billing account and returns it.
apiKeyheader
x-api-key<token>application/json- body
name*stringLength
length <= 120Organization
application/json- response
id*stringbillingAccountId*stringname*stringslug*stringavatarUrl*|URL of the organization's avatar image, hosted by Samva. Null when no avatar is set.
defaultRegion*|nulltimezone*stringplan*stringisActive*booleancreatedAt*stringupdatedAt*stringmetadata*|nullreplyToDefault*array<string>|nullemailFooterEnabledDefault*boolean|nullmessagesUsed*numbermessagesUsedThisMonth*numbersmsUsed*numbersmsUsedThisMonth*numberwhatsappUsed*numberwhatsappUsedThisMonth*numberemailUsed*numberemailUsedThisMonth*numbercontactsUsed*numberconversationsUsed*numberteamMembersUsed*numbermessagesResetAt*string|nullimport { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.organizations.create({ "name": "example"});Example Response
{ "id": "string", "billingAccountId": "string", "name": "string", "slug": "string", "avatarUrl": "string", "defaultRegion": "string", "timezone": "string", "plan": "string", "isActive": true, "createdAt": "string", "updatedAt": "string", "metadata": { "property1": "string", "property2": "string" }, "replyToDefault": [ "string" ], "emailFooterEnabledDefault": true, "messagesUsed": 0, "messagesUsedThisMonth": 0, "smsUsed": 0, "smsUsedThisMonth": 0, "whatsappUsed": 0, "whatsappUsedThisMonth": 0, "emailUsed": 0, "emailUsedThisMonth": 0, "contactsUsed": 0, "conversationsUsed": 0, "teamMembersUsed": 0, "messagesResetAt": "string"}Related documentation
Assign a personal mailbox
Assigns a personal address to an existing member. Only organization owners and admins may assign it; the member receives the sole user grant.
Get the organization avatar upload URL
Returns where to upload the organization avatar. View request and response details for this Samva email API endpoint.