Loading...
Loading...
Compare original and translation side by side
Direct sharing (target is already a workspace member) is handled immediately byin the project-management skill — no invitation is created.POST /v1/projects/{projectId}/share
直接共享(目标用户已是工作区成员)由project-management skill中的接口直接处理——不会创建邀请。POST /v1/projects/{projectId}/share
Authorization: Bearer $SPUREE_ACCESS_TOKENX-API-Key: $SPUREE_API_KEYAuthorization: Bearer $SPUREE_ACCESS_TOKENX-API-Key: $SPUREE_API_KEYhttps://data.spuree.com/api/v1/projectshttps://data.spuree.com/api/v1/projects{
"id": "64a7b8c9d1e2f3a4b5c6d7e8",
"projectId": "64a7b8c9d1e2f3a4b5c6d7e9",
"projectName": "My Animation Project",
"workspaceId": "64a7b8c9d1e2f3a4b5c6d7f0",
"invitedEmail": "new-user@example.com",
"invitedBy": "owner@example.com",
"status": "pending",
"createdAt": "2024-01-15T10:00:00Z",
"expiresAt": "2024-01-22T10:00:00Z"
}| Field | Type | Description |
|---|---|---|
| string | Invitation ObjectId |
| string | Project ObjectId |
| string? | Project name |
| string | Workspace ObjectId |
| string | Invited user's email |
| string | Inviter's email |
| string | |
| datetime | Creation timestamp |
| datetime | Expiration (7 days after creation or last resend) |
{
"id": "64a7b8c9d1e2f3a4b5c6d7e8",
"projectId": "64a7b8c9d1e2f3a4b5c6d7e9",
"projectName": "My Animation Project",
"workspaceId": "64a7b8c9d1e2f3a4b5c6d7f0",
"invitedEmail": "new-user@example.com",
"invitedBy": "owner@example.com",
"status": "pending",
"createdAt": "2024-01-15T10:00:00Z",
"expiresAt": "2024-01-22T10:00:00Z"
}| 字段 | 类型 | 描述 |
|---|---|---|
| string | 邀请的ObjectId |
| string | 项目的ObjectId |
| string? | 项目名称 |
| string | 工作区的ObjectId |
| string | 被邀请用户的邮箱 |
| string | 邀请者的邮箱 |
| string | 状态: |
| datetime | 创建时间戳 |
| datetime | 过期时间(创建或最后一次重发后的7天) |
{ "invitations": [ InvitationObject, ... ] }curl "https://data.spuree.com/api/v1/projects/invitations/pending" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"{ "invitations": [ InvitationObject, ... ] }curl "https://data.spuree.com/api/v1/projects/invitations/pending" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"sharedWith{
"messageCode": "success",
"projectId": "...",
"projectName": "My Animation Project",
"workspaceId": "..."
}| Code | Description |
|---|---|
| 200 | Accepted — user added to project and workspace |
| 403 | Token does not belong to the authenticated user |
| 404 | Invitation not found or expired |
curl -X POST "https://data.spuree.com/api/v1/projects/invitations/{token}/accept" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"sharedWith{
"messageCode": "success",
"projectId": "...",
"projectName": "My Animation Project",
"workspaceId": "..."
}| 状态码 | 描述 |
|---|---|
| 200 | 已接受——用户已添加到项目和工作区 |
| 403 | Token不属于当前认证用户 |
| 404 | 邀请不存在或已过期 |
curl -X POST "https://data.spuree.com/api/v1/projects/invitations/{token}/accept" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"{ "messageCode": "success", "projectId": "..." }curl -X POST "https://data.spuree.com/api/v1/projects/invitations/{token}/decline" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"{ "messageCode": "success", "projectId": "..." }curl -X POST "https://data.spuree.com/api/v1/projects/invitations/{token}/decline" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"{ "invitations": [ InvitationObject, ... ] }curl "https://data.spuree.com/api/v1/projects/{projectId}/invitations" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"{ "invitations": [ InvitationObject, ... ] }curl "https://data.spuree.com/api/v1/projects/{projectId}/invitations" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"{ "messageCode": "success", "projectId": "..." }curl -X DELETE "https://data.spuree.com/api/v1/projects/{projectId}/invitations/{invitationId}" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"{ "messageCode": "success", "projectId": "..." }curl -X DELETE "https://data.spuree.com/api/v1/projects/{projectId}/invitations/{invitationId}" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"{ "messageCode": "success", "projectId": "..." }curl -X POST "https://data.spuree.com/api/v1/projects/{projectId}/invitations/{invitationId}/resend" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"{ "messageCode": "success", "projectId": "..." }curl -X POST "https://data.spuree.com/api/v1/projects/{projectId}/invitations/{invitationId}/resend" \
-H "Authorization: Bearer $SPUREE_ACCESS_TOKEN"POST /v1/projects/{id}/share { "email": "new-user@example.com" }
→ { type: "invitation", projectId: "..." }GET /v1/projects/invitations/pendingPOST /v1/projects/invitations/{token}/acceptPOST /v1/projects/{id}/share { "email": "new-user@example.com" }
→ { type: "invitation", projectId: "..." }GET /v1/projects/invitations/pendingPOST /v1/projects/invitations/{token}/accept| Code | Description |
|---|---|
| 200 | Success |
| 400 | Invalid token or ID format |
| 401 | Invalid or expired auth token |
| 403 | Not authorized (wrong user, not owner/inviter) |
| 404 | Invitation not found, expired, or already actioned |
| 409 | Invitation already pending for this user |
| 500 | Internal server error |
| 状态码 | 描述 |
|---|---|
| 200 | 成功 |
| 400 | 无效的token或ID格式 |
| 401 | 无效或过期的认证token |
| 403 | 无权限(用户错误,非所有者/邀请者) |
| 404 | 邀请不存在、已过期或已被处理 |
| 409 | 该用户已有待处理的邀请 |
| 500 | 内部服务器错误 |