Box Developer Documentation

A beta version of the new Box developer documentation site is launching soon! Updated Developer Guides, modern API Reference, and AI-powered search are on the way to help you build with Box faster. Stay tuned for more updates.

Get Pending Collaborations

Guides Collaborations Get Pending Collaborations
Edit this page

Get Pending Collaborations

To get the pending collaborations for a user, call the GET /collaborations API with a status of pending.

cURL
curl -i -X GET "https://api.box.com/2.0/collaborations?status=pending" \
     -H "authorization: Bearer <ACCESS_TOKEN>"
Node/TypeScript v10
await client.listCollaborations.getCollaborations({
  status: 'pending' as GetCollaborationsQueryParamsStatusField,
} satisfies GetCollaborationsQueryParams);
Python v10
client.list_collaborations.get_collaborations(GetCollaborationsStatus.PENDING)
.NET v10
await client.ListCollaborations.GetCollaborationsAsync(queryParams: new GetCollaborationsQueryParams(status: GetCollaborationsQueryParamsStatusField.Pending));
Swift v10
try await client.listCollaborations.getCollaborations(queryParams: GetCollaborationsQueryParams(status: GetCollaborationsQueryParamsStatusField.pending))
Java v10
client.getListCollaborations().getCollaborations(new GetCollaborationsQueryParams(GetCollaborationsQueryParamsStatusField.PENDING))
Java v5
Collection<BoxCollaboration.Info> pendingCollaborations =
    BoxCollaboration.getPendingCollaborations(api);
Python v4
pending_collaborations = client.get_pending_collaborations()
for pending_collaboration in pending_collaborations:
    print(f'Collaboration {pending_collaboration.id} is pending')
.NET v6
BoxCollection<BoxCollaboration> pendingCollabs = await CollaborationsManager
    .GetPendingCollaborationAsync();
Node v4
client.collaborations.getPending()
	.then(collaborations => {
		/* collaborations -> {
			total_count: 1,
			entries: [
				{
					type: 'collaboration',
					id: '11111',
					created_by: {
						type: 'user',
						id: '22222',
						name: 'Example User',
						login: 'user@example.com'
					},
					created_at: '2011-11-29T12:56:35-08:00',
					modified_at: '2012-09-11T15:12:32-07:00',
					expires_at: null,
					status: 'pending',
					accessible_by: {
						type: 'user',
						id: '33333',
						name: 'Collaborator User',
						login: 'collaborator@example.com'
					},
					role: 'editor',
					acknowledged_at: '2011-11-29T12:59:40-08:00',
					item: null
				}
			]
		}
		*/
	});

This only returns the current list of pending collaborations for a user. This API does not allow for returning all collaborations for a user.