Organizations

Get the organization avatar upload URL

Returns where to upload the organization avatar. View request and response details for this Samva email API endpoint.

POST
/v1/organizations/current/avatar-upload

Returns where to upload the organization avatar. PUT the png, jpeg, or webp bytes (at most maxBytes) to uploadUrl with the same credential and a matching Content-Type; the response is { src }. Then send PATCH /v1/organizations/current with { avatarUrl: src }.

Authorization

apiKey
headerx-api-key<token>

Response Body

Success

application/json
  1. response
uploadUrl*string

The URL to PUT the image bytes to.

maxBytes*number

The largest image the upload accepts, in bytes.

contentTypes*array<string>

The image content types the upload accepts.

Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.organizations.createAvatarUpload({});
Example Response
{  "uploadUrl": "string",  "maxBytes": 0,  "contentTypes": [    "string"  ]}

Related documentation