API 管理
创建和管理 API 密钥以编程访问您的账户
API 文档
身份验证标头
使用 X-API-Key 标头在每个请求中包含您的 API 密钥:
X-API-Key: your_api_key_here
端点
标准端点
/jobs/add
使用指定的详细信息创建新任务/活动。需要 multipart/form-data 内容类型。将 approve_once_full 设置为 true 可在任务达到总可用数量时自动批准所有提交并向工作者付款。
请求
Content-Type: multipart/form-data title: string (required) description: string (required) pay_rate: decimal (required) total_availabilities: integer (required) proof_required_description: string (required) category: string (required) sub_category: string (optional) campaign_image: file (optional) countries: array (optional. Omit to include all countries) approve_once_full: boolean (optional, default: false. When true, all submissions are automatically approved and workers paid once the job reaches its total availabilities)
响应
// 201 Created
{
"success": true,
"message": "Job created successfully",
"job": {
"public_id": "123e4567-e89b-12d3-a456-426614174000",
"title": "Test Job",
"status": "Active",
"pay_rate": "5.00",
"total_availabilities": 10
},
"deduction_details": {
"total_cost": "50.00",
"commission": "5.00",
"total_deducted": "55.00",
"new_balance": "945.00"
}
}错误响应
- 400 — Invalid data or insufficient balance
- 401 — Invalid or missing API key
- 403 — Job rejected by legitimacy check
代码示例
import requests
# Create a job without image
job_data = {
"title": "Complete a Survey",
"description": "Fill out our 5-minute customer satisfaction survey",
"pay_rate": "2.50",
"total_availabilities": "100",
"proof_required_description": "Submit a screenshot of the completion page",
"category": "Survey",
"sub_category": (None, "Customer Feedback"),
"countries": (None, '["US", "CA", "GB"]'), # Omit to include all countries
}
response = requests.post(
"https://api.rapidworkers.io/jobs/add",
headers={"X-API-Key": "your_api_key_here"},
files=job_data
)
job = response.json()
print(f"Job created: {job['job']['public_id']}")/account/get_balance
检索您当前的账户余额。
请求
Content-Type: application/json
{} // Empty body响应
// 200 OK
{
"balance": "1000.00"
}错误响应
- 401 — Invalid or missing API key
- 404 — User not found
代码示例
import requests
response = requests.post(
"https://api.rapidworkers.io/account/get_balance",
headers={"X-API-Key": "your_api_key_here"}
)
print(f"Balance: {response.json()['balance']}")/api/campaigns/{campaign_id}/submissions/{submission_id}/approve/
批准工作者为您的活动提交的内容。
路径参数
campaign_id (UUID) submission_id (integer)
请求
Content-Type: application/json
{
"notes": "Great work!" // Optional
}响应
// 200 OK
{
"success": true,
"message": "Submission approved successfully",
"submission": {
"id": 123,
"user": "worker_username",
"status": "Approved",
"amount_paid": "5.00"
}
}错误响应
- 400 — Submission already processed or insufficient funds
- 403 — You don't own this campaign
- 404 — Submission not found
代码示例
import requests
campaign_id = "your_campaign_public_id"
submission_id = 456
response = requests.post(
f"https://api.rapidworkers.io/api/campaigns/{campaign_id}/submissions/{submission_id}/approve/",
headers={"X-API-Key": "your_api_key_here"},
json={"notes": "Great work!"}
)
print(f"Submission approved: {response.json()}")/api/campaigns/{campaign_id}/submissions/{submission_id}/reject/
带原因拒绝工作者的提交。
路径参数
campaign_id (UUID) submission_id (integer)
请求
Content-Type: application/json
{
"notes": "Does not meet requirements" // Required
}响应
// 200 OK
{
"success": true,
"message": "Submission rejected",
"submission": {
"id": 123,
"user": "worker_username",
"status": "Rejected",
"notes": "Does not meet requirements"
}
}错误响应
- 400 — Missing rejection reason
- 403 — You don't own this campaign
- 404 — Submission not found
代码示例
import requests
campaign_id = "your_campaign_public_id"
submission_id = 456
response = requests.post(
f"https://api.rapidworkers.io/api/campaigns/{campaign_id}/submissions/{submission_id}/reject/",
headers={"X-API-Key": "your_api_key_here"},
json={"notes": "Screenshot does not show completion page"}
)
print(f"Submission rejected: {response.json()}")/api/campaigns/{campaign_id}/submissions/bulk_action/
一次性批准活动的所有待处理提交。
路径参数
campaign_id (UUID)
请求
Content-Type: application/json
{
"notes": "Bulk action notes" // Optional
}响应
// 200 OK
{
"success": true,
"message": "All submissions approved successfully.",
"submissions": [
{ "id": 123, "status": "Approved", "user": "worker1" },
{ "id": 124, "status": "Approved", "user": "worker2" }
]
}错误响应
- 403 — You don't own this campaign
- 404 — No pending submissions found
代码示例
import requests
campaign_id = "your_campaign_public_id"
# Bulk approve all pending
response = requests.post(
f"https://api.rapidworkers.io/api/campaigns/{campaign_id}/submissions/bulk_action/",
headers={"X-API-Key": "your_api_key_here"},
json={"notes": "All submissions verified"}
)
print(f"Bulk action result: {response.json()}")/api/campaigns/
检索所有已验证用户的活动,并可选择进行状态筛选。
请求
Query Parameters (optional):
status: string ("Active", "Pending", "Completed", "Canceled")
language: string (default: "en")响应
// 200 OK
[
{
"jobId": "123e4567-e89b-12d3-a456-426614174000",
"jobTitle": "Complete a Survey",
"jobCategory": "Survey",
"jobPay": "2.50",
"jobLocation": "In",
"jobCreatedAt": "2025-01-15T10:30:00Z",
"jobStatus": "Active",
"jobInstancesCompleted": 45,
"jobTotalAvailabilities": 100,
"jobSuccessRate": "40%",
"description": "Fill out our customer satisfaction survey",
"canceled": false,
"remainingAvailabilities": 55,
"pendingSubmissions": 12,
"approvedSubmissions": 40,
"rejectedSubmissions": 5
}
]
错误响应
- 401 — Invalid or missing API key
代码示例
import requests
# List all campaigns
response = requests.get(
"https://api.rapidworkers.io/api/campaigns/",
headers={"X-API-Key": "your_api_key_here"}
)
campaigns = response.json()
for campaign in campaigns["results"]:
print(f"{campaign['jobTitle']} - {campaign['jobStatus']}")
# Filter by status
response = requests.get(
"https://api.rapidworkers.io/api/campaigns/?status=Active",
headers={"X-API-Key": "your_api_key_here"}
)/api/campaigns/detail/{campaign_id}/
检索特定活动的详细信息,包括提交计数和剩余可用数量。
路径参数
campaign_id (UUID)
请求
Query Parameters (optional): language: string (default: "en")
响应
// 200 OK
{
"jobId": "123e4567-e89b-12d3-a456-426614174000",
"jobTitle": "Complete a Survey",
"jobCategory": "Survey",
"jobPay": "2.50",
"jobLocation": "In",
"jobCreatedAt": "2025-01-15T10:30:00Z",
"jobStatus": "Active",
"jobInstancesCompleted": 45,
"jobTotalAvailabilities": 100,
"jobSuccessRate": "40%",
"description": "Fill out our customer satisfaction survey",
"canceled": false,
"remainingAvailabilities": 55,
"pendingSubmissions": 12,
"approvedSubmissions": 40,
"rejectedSubmissions": 5
}错误响应
- 401 — Invalid or missing API key
- 403 — You don't own this campaign
- 404 — Campaign not found
代码示例
import requests
campaign_id = "123e4567-e89b-12d3-a456-426614174000"
response = requests.get(
f"https://api.rapidworkers.io/api/campaigns/detail/{campaign_id}/",
headers={"X-API-Key": "your_api_key_here"}
)
campaign = response.json()
print(f"Remaining slots: {campaign['remaining_availabilities']}")
print(f"Pending: {campaign['pending_submissions']}")/api/campaigns/{campaign_id}/submissions/
检索特定活动的所有提交,包含工作者元数据、可选状态筛选和分页。
路径参数
campaign_id (UUID)
请求
Query Parameters (optional):
status: string ("Pending", "Approved", "Rejected")
search: string (search by worker name)
page: integer (default: 1)
rowsPerPage: integer (default: 1000)
language: string (default: "en")响应
// 200 OK
{
"count": 45,
"next": null,
"previous": null,
"results": {
"submissions": [
{
"submissionId": 123,
"userId": "abc-def-123",
"userName": "WorkerName",
"userAvatar": "https://...",
"campaignId": "123e4567-e89b-12d3-a456-426614174000",
"campaignTitle": "Complete a Survey",
"status": "Pending",
"country_name": "United States",
"submittedAt": "2025-01-16T14:30:00Z",
"proof_text": "Completed the survey as requested",
"images": [
{
"id": "img_1",
"url": "https://...",
"thumbnailUrl": "https://..."
}
],
"notes": null,
"workerAccountAgeDays": 120,
"workerApprovalRate": "85%",
"workerTotalCompleted": 47
}
],
"pagination": {
"totalCount": 45,
"pageCount": 1,
"currentPage": 1,
"rowsPerPage": 1000
}
}
}错误响应
- 401 — Invalid or missing API key
- 403 — You don't own this campaign
- 404 — Campaign not found
代码示例
import requests
campaign_id = "123e4567-e89b-12d3-a456-426614174000"
# List all submissions
response = requests.get(
f"https://api.rapidworkers.io/api/campaigns/{campaign_id}/submissions/",
headers={"X-API-Key": "your_api_key_here"}
)
data = response.json()
for sub in data["results"]["submissions"]:
print(f"#{sub['submissionId']} - {sub['status']} - Age: {sub['worker_account_age_days']}d")
# Filter pending only
response = requests.get(
f"https://api.rapidworkers.io/api/campaigns/{campaign_id}/submissions/?status=Pending",
headers={"X-API-Key": "your_api_key_here"}
)/api/workers/block/
屏蔽某个工作者,使其无法向您的任何活动提交证明。被屏蔽的工作者将无法在其工作列表中看到您的活动。
请求
Content-Type: application/json
{
"worker_id": 12345 // Worker public ID
}响应
// 201 Created
{
"success": true,
"message": "Worker blocked successfully",
"worker_id": 12345
}错误响应
- 400 — Missing worker_id, self-block attempt, or worker already blocked
- 401 — Invalid or missing API key
- 404 — Worker not found
代码示例
import requests
worker_id = 12345
response = requests.post(
"https://api.rapidworkers.io/api/workers/block/",
headers={"X-API-Key": "your_api_key_here", "Content-Type": "application/json"},
json={"worker_id": worker_id}
)
print(f"Worker blocked: {response.json()}")/api/workers/unblock/
取消屏蔽之前被屏蔽的工作者,允许他们再次查看您的活动并提交证明。
请求
Content-Type: application/json
{
"worker_id": 12345
}响应
// 200 OK
{
"success": true,
"message": "Worker unblocked successfully",
"worker_id": 12345
}错误响应
- 400 — Missing worker_id or worker is not blocked
- 401 — Invalid or missing API key
- 404 — Worker not found
代码示例
import requests
worker_id = 12345
response = requests.post(
"https://api.rapidworkers.io/api/workers/unblock/",
headers={"X-API-Key": "your_api_key_here", "Content-Type": "application/json"},
json={"worker_id": worker_id}
)
print(f"Worker unblocked: {response.json()}")/api/workers/blocked/
检索您已屏蔽的所有工作者列表。
请求
No request body required.
响应
// 200 OK
[
{
"worker_id": 12345,
"worker_name": "WorkerName",
"blocked_at": "2025-01-15T10:30:00Z"
}
]错误响应
- 401 — Invalid or missing API key
代码示例
import requests
response = requests.get(
"https://api.rapidworkers.io/api/workers/blocked/",
headers={"X-API-Key": "your_api_key_here"}
)
blocked = response.json()
for worker in blocked:
print(f"Blocked: {worker['worker_name']} (ID: {worker['worker_id']})")预填充任务端点
用于常见社交媒体互动任务的简化端点。只需要链接和数量。所有预填任务均已启用自动批准:任务达到总可用数量时,提交将自动获得批准并向工作者付款。
/api/jobs/facebook-likes/
创建一个简化的任务来获取 Facebook 帖子赞。只需要链接和数量。 Auto-pricing: $0.05 per job. 任务满员后,提交将自动获得批准。
请求
Content-Type: application/json
{
"link": "https://facebook.com/post/123", // Required
"quantity": 50, // Required (minimum: 6)
"countries": ["US", "GB"], // Omit to include all countries
"language": "en", // Optional
"approve_once_full": true // Optional (default: true). Auto-approve all submissions once job is full
}响应
// 201 Created
{
"success": true,
"message": "Job created successfully",
"job_id": "123e4567-e89b-12d3-a456-426614174000",
"total_cost": "2.50"
}错误响应
- 400 — Invalid data, insufficient balance, or quantity below minimum (6)
- 401 — Invalid or missing API key
代码示例
import requests
response = requests.post(
"https://api.rapidworkers.io/api/jobs/facebook-likes/",
headers={"X-API-Key": "your_api_key_here", "Content-Type": "application/json"},
json={
"link": "https://facebook.com/post/123",
"quantity": 50 # Minimum: 6
}
)
job = response.json()
print(f"Job created: {job['job_id']}")/api/jobs/facebook-shares/
创建一个简化的任务来获取 Facebook 帖子分享。只需要链接和数量。 Auto-pricing: $0.05 per job. 任务满员后,提交将自动获得批准。
请求
Content-Type: application/json
{
"link": "https://facebook.com/post/123", // Required
"quantity": 25, // Required (minimum: 6)
"countries": ["US", "CA"], // Omit to include all countries
"language": "en", // Optional
"approve_once_full": true // Optional (default: true). Auto-approve all submissions once job is full
}响应
// 201 Created
{
"success": true,
"message": "Job created successfully",
"job_id": "123e4567-e89b-12d3-a456-426614174000",
"total_cost": "1.25"
}错误响应
- 400 — Invalid data, insufficient balance, or quantity below minimum (6)
- 401 — Invalid or missing API key
代码示例
import requests
response = requests.post(
"https://api.rapidworkers.io/api/jobs/facebook-shares/",
headers={"X-API-Key": "your_api_key_here", "Content-Type": "application/json"},
json={
"link": "https://facebook.com/post/123",
"quantity": 25 # Minimum: 6
}
)
job = response.json()
print(f"Job created: {job['job_id']}")/api/jobs/instagram-likes/
创建一个简化的任务来获取 Instagram 帖子赞。只需要链接和数量。 Auto-pricing: $0.05 per job. 任务满员后,提交将自动获得批准。
请求
Content-Type: application/json
{
"link": "https://instagram.com/ABC123", // Required
"quantity": 100, // Required (minimum: 6)
"countries": ["US", "GB"], // Omit to include all countries
"language": "en", // Optional
"approve_once_full": true // Optional (default: true). Auto-approve all submissions once job is full
}响应
// 201 Created
{
"success": true,
"message": "Job created successfully",
"job_id": "123e4567-e89b-12d3-a456-426614174000",
"total_cost": "5.00"
}错误响应
- 400 — Invalid data, insufficient balance, or quantity below minimum (6)
- 401 — Invalid or missing API key
代码示例
import requests
response = requests.post(
"https://api.rapidworkers.io/api/jobs/instagram-likes/",
headers={"X-API-Key": "your_api_key_here", "Content-Type": "application/json"},
json={
"link": "https://instagram.com/ABC123",
"quantity": 100 # Minimum: 6
}
)
job = response.json()
print(f"Job created: {job['job_id']}")/api/jobs/instagram-followers/
创建一个简化的任务来获得 Instagram 粉丝。只需要链接和数量。 Auto-pricing: $0.05 per job. 任务满员后,提交将自动获得批准。
请求
Content-Type: application/json
{
"link": "https://instagram.com/username", // Required
"quantity": 50, // Required (minimum: 6)
"countries": ["US", "CA"], // Omit to include all countries
"language": "en", // Optional
"approve_once_full": true // Optional (default: true). Auto-approve all submissions once job is full
}响应
// 201 Created
{
"success": true,
"message": "Job created successfully",
"job_id": "123e4567-e89b-12d3-a456-426614174000",
"total_cost": "2.50"
}错误响应
- 400 — Invalid data, insufficient balance, or quantity below minimum (6)
- 401 — Invalid or missing API key
代码示例
import requests
response = requests.post(
"https://api.rapidworkers.io/api/jobs/instagram-followers/",
headers={"X-API-Key": "your_api_key_here", "Content-Type": "application/json"},
json={
"link": "https://instagram.com/username",
"quantity": 50 # Minimum: 6
}
)
job = response.json()
print(f"Job created: {job['job_id']}")/api/jobs/twitter-likes/
创建一个简化的任务来获取 Twitter/X 帖子赞。只需要链接和数量。 Auto-pricing: $0.05 per job. 任务满员后,提交将自动获得批准。
请求
Content-Type: application/json
{
"link": "https://twitter.com/user/status/123", // Required
"quantity": 75, // Required (minimum: 6)
"countries": ["US", "GB"], // Omit to include all countries
"language": "en", // Optional
"approve_once_full": true // Optional (default: true). Auto-approve all submissions once job is full
}响应
// 201 Created
{
"success": true,
"message": "Job created successfully",
"job_id": "123e4567-e89b-12d3-a456-426614174000",
"total_cost": "3.75"
}错误响应
- 400 — Invalid data, insufficient balance, or quantity below minimum (6)
- 401 — Invalid or missing API key
代码示例
import requests
response = requests.post(
"https://api.rapidworkers.io/api/jobs/twitter-likes/",
headers={"X-API-Key": "your_api_key_here", "Content-Type": "application/json"},
json={
"link": "https://twitter.com/user/status/123",
"quantity": 75 # Minimum: 6
}
)
job = response.json()
print(f"Job created: {job['job_id']}")/api/jobs/twitter-followers/
创建一个简化的任务来获得 Twitter/X 粉丝。只需要链接和数量。 Auto-pricing: $0.05 per job. 任务满员后,提交将自动获得批准。
请求
Content-Type: application/json
{
"link": "https://twitter.com/username", // Required
"quantity": 50, // Required (minimum: 6)
"countries": ["US", "CA"], // Omit to include all countries
"language": "en", // Optional
"approve_once_full": true // Optional (default: true). Auto-approve all submissions once job is full
}响应
// 201 Created
{
"success": true,
"message": "Job created successfully",
"job_id": "123e4567-e89b-12d3-a456-426614174000",
"total_cost": "2.50"
}错误响应
- 400 — Invalid data, insufficient balance, or quantity below minimum (6)
- 401 — Invalid or missing API key
代码示例
import requests
response = requests.post(
"https://api.rapidworkers.io/api/jobs/twitter-followers/",
headers={"X-API-Key": "your_api_key_here", "Content-Type": "application/json"},
json={
"link": "https://twitter.com/username",
"quantity": 50 # Minimum: 6
}
)
job = response.json()
print(f"Job created: {job['job_id']}")/api/jobs/twitter-retweets/
创建一个简化的任务来获取 Twitter/X 转发。只需要链接和数量。 Auto-pricing: $0.05 per job. 任务满员后,提交将自动获得批准。
请求
Content-Type: application/json
{
"link": "https://twitter.com/user/status/123", // Required
"quantity": 30, // Required (minimum: 6)
"countries": ["US", "GB"], // Omit to include all countries
"language": "en", // Optional
"approve_once_full": true // Optional (default: true). Auto-approve all submissions once job is full
}响应
// 201 Created
{
"success": true,
"message": "Job created successfully",
"job_id": "123e4567-e89b-12d3-a456-426614174000",
"total_cost": "1.50"
}错误响应
- 400 — Invalid data, insufficient balance, or quantity below minimum (6)
- 401 — Invalid or missing API key
代码示例
import requests
response = requests.post(
"https://api.rapidworkers.io/api/jobs/twitter-retweets/",
headers={"X-API-Key": "your_api_key_here", "Content-Type": "application/json"},
json={
"link": "https://twitter.com/user/status/123",
"quantity": 30 # Minimum: 6
}
)
job = response.json()
print(f"Job created: {job['job_id']}")/api/jobs/trustpilot-reviews/
创建一个简化的任务来获取 Trustpilot 评论。只需要链接和数量。 Auto-pricing: $0.05 per job. 任务满员后,提交将自动获得批准。
请求
Content-Type: application/json
{
"link": "https://trustpilot.com/review/example.com", // Required
"quantity": 20, // Required (minimum: 6)
"countries": ["US", "CA"], // Omit to include all countries
"language": "en", // Optional
"approve_once_full": true // Optional (default: true). Auto-approve all submissions once job is full
}响应
// 201 Created
{
"success": true,
"message": "Job created successfully",
"job_id": "123e4567-e89b-12d3-a456-426614174000",
"total_cost": "1.00"
}错误响应
- 400 — Invalid data, insufficient balance, or quantity below minimum (6)
- 401 — Invalid or missing API key
代码示例
import requests
response = requests.post(
"https://api.rapidworkers.io/api/jobs/trustpilot-reviews/",
headers={"X-API-Key": "your_api_key_here", "Content-Type": "application/json"},
json={
"link": "https://trustpilot.com/review/example.com",
"quantity": 20 # Minimum: 6
}
)
job = response.json()
print(f"Job created: {job['job_id']}")/api/jobs/9gag-upvotes/
创建一个简化的任务来获取 9GAG 点赞。只需要链接和数量。 Auto-pricing: $0.05 per job. 任务满员后,提交将自动获得批准。
请求
Content-Type: application/json
{
"link": "https://9gag.com/gag/abc123", // Required
"quantity": 50, // Required (minimum: 6)
"countries": ["US", "GB"], // Omit to include all countries
"language": "en", // Optional
"approve_once_full": true // Optional (default: true). Auto-approve all submissions once job is full
}响应
// 201 Created
{
"success": true,
"message": "Job created successfully",
"job_id": "123e4567-e89b-12d3-a456-426614174000",
"total_cost": "2.50"
}错误响应
- 400 — Invalid data, insufficient balance, or quantity below minimum (6)
- 401 — Invalid or missing API key
代码示例
import requests
response = requests.post(
"https://api.rapidworkers.io/api/jobs/9gag-upvotes/",
headers={"X-API-Key": "your_api_key_here", "Content-Type": "application/json"},
json={
"link": "https://9gag.com/gag/abc123",
"quantity": 50 # Minimum: 6
}
)
job = response.json()
print(f"Job created: {job['job_id']}")/api/jobs/youtube-likes/
创建一个简化的任务来获取 YouTube 视频赞。只需要链接和数量。 Auto-pricing: $0.05 per job. 任务满员后,提交将自动获得批准。
请求
Content-Type: application/json
{
"link": "https://youtube.com/watch?v=abc123", // Required
"quantity": 100, // Required (minimum: 6)
"countries": ["US", "CA"], // Omit to include all countries
"language": "en", // Optional
"approve_once_full": true // Optional (default: true). Auto-approve all submissions once job is full
}响应
// 201 Created
{
"success": true,
"message": "Job created successfully",
"job_id": "123e4567-e89b-12d3-a456-426614174000",
"total_cost": "5.00"
}错误响应
- 400 — Invalid data, insufficient balance, or quantity below minimum (6)
- 401 — Invalid or missing API key
代码示例
import requests
response = requests.post(
"https://api.rapidworkers.io/api/jobs/youtube-likes/",
headers={"X-API-Key": "your_api_key_here", "Content-Type": "application/json"},
json={
"link": "https://youtube.com/watch?v=abc123",
"quantity": 100 # Minimum: 6
}
)
job = response.json()
print(f"Job created: {job['job_id']}")错误处理
所有 API 错误都遵循一致的格式:
{
"error": "Error message describing what went wrong"
}- 200 请求成功
- 201 资源创建成功
- 400 请求数据无效
- 401 API 密钥缺失或无效
- 403 权限不足
- 404 找不到资源
- 429 超出速率限制 (1,000/小时)
- 500 服务器端错误