Release WhatsApp shared line assignment
Release WhatsApp shared line assignment: releaseWhatsappSharedLineAssignment in the TypeScript, Python, Rust and Go clients.
DELETE /v1/projects/{id}/platforms/whatsapp/assignments/{assignmentId}
Releases a WhatsApp shared line assignment, freeing its seat for reassignment. The row is retained for audit and returned with releasedAt set, so repeating the call is safe. Requires the platforms:write permission bound to the project resource in the path.
photon.projects.platforms.releaseWhatsappSharedLineAssignment(input: ReleaseWhatsappSharedLineAssignmentInput, options?: RequestOptions): Promise<ReleaseWhatsappSharedLineAssignmentOutput>photon.projects.platforms.release_whatsapp_shared_line_assignment(input: ReleaseWhatsappSharedLineAssignmentInput, *, options: RequestOptions | None = None,) -> models.SharedLineAssignmentclient.release_whatsapp_shared_line_assignment(assignment_id: String, id: String).await -> Result<ResponseValue<types::SharedLineAssignment>, Error<ReleaseWhatsappSharedLineAssignmentError>>client.Projects.Platforms.ReleaseWhatsappSharedLineAssignment(ctx context.Context, params *ReleaseWhatsappSharedLineAssignmentParams, opts ...RequestOption) (*SharedLineAssignment, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.platforms.releaseWhatsappSharedLineAssignment({
path: {
assignmentId: "assignmentId",
id: "id",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import ReleaseWhatsappSharedLineAssignmentInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.platforms.release_whatsapp_shared_line_assignment(
ReleaseWhatsappSharedLineAssignmentInput.model_validate({
"path": {
"assignmentId": "assignmentId",
"id": "id",
},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.release_whatsapp_shared_line_assignment("assignmentId".to_owned(), "id".to_owned())
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
result, err := client.Projects.Platforms.ReleaseWhatsappSharedLineAssignment(ctx, &photonapi.ReleaseWhatsappSharedLineAssignmentParams{
AssignmentID: "assignmentId",
ID: "id",
})
if err != nil {
return err
}
_ = result{
"assignedPhoneNumber": "string",
"assignmentId": "string",
"createdAt": "2026-01-01T00:00:00.000Z",
"email": "string",
"firstName": "string",
"handle": "string",
"lastName": "string",
"optIn": {
"receivedAt": "2026-01-01T00:00:00.000Z",
"state": "pending"
},
"platform": "imessage",
"projectId": "string",
"releasedAt": "2026-01-01T00:00:00.000Z",
"updatedAt": "2026-01-01T00:00:00.000Z"
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Returns
200 The released WhatsApp shared line assignment. SharedLineAssignment
Headers: Photon-Version. The raw response carries these headers; see Raw responses.
Whether the end user has texted the assigned line from their handle since this assignment was created. Until they have, sends to them on this line are refused; once they have, the project can message them while the assignment is unreleased. A released assignment keeps its opt-in, and a re-created assignment starts pending. This records only that Photon allows replies; it is not a consent record for SMS compliance.