List WhatsApp shared line assignments
List WhatsApp shared line assignments: listWhatsappSharedLineAssignments in the TypeScript, Python, Rust and Go clients.
GET /v1/projects/{id}/platforms/whatsapp/assignments
Lists the project's WhatsApp shared line assignments, oldest first. Released assignments are excluded unless includeReleased is set. Requires the platforms:read permission bound to the project resource in the path.
photon.projects.platforms.listWhatsappSharedLineAssignments(input: ListWhatsappSharedLineAssignmentsInput, options?: RequestOptions): Promise<ListWhatsappSharedLineAssignmentsOutput>photon.projects.platforms.list_whatsapp_shared_line_assignments(input: ListWhatsappSharedLineAssignmentsInput, *, options: RequestOptions | None = None,) -> models.SharedLineAssignmentPageclient.list_whatsapp_shared_line_assignments(id: String, params: Option<ListWhatsappSharedLineAssignmentsParams>).await -> Result<ResponseValue<types::SharedLineAssignmentPage>, Error<ListWhatsappSharedLineAssignmentsError>>client.Projects.Platforms.ListWhatsappSharedLineAssignments(ctx context.Context, params *ListWhatsappSharedLineAssignmentsParams, opts ...RequestOption) (*SharedLineAssignmentPage, 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.listWhatsappSharedLineAssignments({
path: {
id: "id",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import ListWhatsappSharedLineAssignmentsInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.platforms.list_whatsapp_shared_line_assignments(
ListWhatsappSharedLineAssignmentsInput.model_validate({
"path": {
"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
.list_whatsapp_shared_line_assignments("id".to_owned(), None)
.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.ListWhatsappSharedLineAssignments(ctx, &photonapi.ListWhatsappSharedLineAssignmentsParams{
ID: "id",
})
if err != nil {
return err
}
_ = result{
"assignments": [
{
"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"
}
],
"nextPageToken": "string"
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
Returns
200 A page of WhatsApp shared line assignments. SharedLineAssignmentPage
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.
304 Not Modified. Sent only when If-None-Match matches the ETag of an earlier 200 response for the same representation; no body. No body.
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.