# Upwork

> Upwork. 19 outils, avec leurs paramètres et des exemples d’appel.

Source: https://piqline.com/fr/docs/api/reference/upwork

Outils de l’agent Upwork : offres publiques lues, notées et rédigées depuis la base de connaissances du workspace. Rien n’est envoyé à Upwork.

Chaque appel est une requête `POST` avec la clé en `Authorization: Bearer`. Le corps JSON est l’entrée de l’outil, et la réponse a la forme `{ "tool": "nom", "output": … }`. Les exemples ne portent que les paramètres requis. Les descriptions des paramètres sont celles que lisent les agents, en anglais.

### `searchUpworkJobs`

Lit une page de résultats publics (une dizaine d’offres) et note chaque offre selon la base de connaissances. Les offres sont ajoutées au pipeline du workspace.

`POST https://piqline.com/api/v1/tools/searchUpworkJobs`

Type : Lecture en direct. Scopes : `explore`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `q` | `string` | Oui | Keywords as a client would write them in a job post, e.g. 'next.js developer' |
| `jobType` | `any \| hourly \| fixed` | Non |  |
| `hourlyMin` | `integer` | Non | Hourly rate floor in USD |
| `hourlyMax` | `integer` | Non |  |
| `fixedMin` | `integer` | Non | Fixed-price budget floor in USD |
| `fixedMax` | `integer` | Non |  |
| `experience` | `array<entry \| intermediate \| expert>` | Non |  |
| `proposals` | `array<0-4 \| 5-9 \| 10-14 \| 15-19 \| 20-49>` | Non | Keep only jobs with this many proposals so far (less competition) |
| `clientHires` | `array<0 \| 1-9 \| 10+>` | Non |  |
| `page` | `integer` | Non |  |
| `score` | `boolean` | Non | Score each job against the knowledge base (judge capped at 12 per call) |
| `persist` | `boolean` | Non | Add the jobs to the workspace pipeline (upwork_pipeline) |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/searchUpworkJobs \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"q":"levée de fonds"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/searchUpworkJobs", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "q": "levée de fonds"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/searchUpworkJobs",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "q": "levée de fonds",
    },
)
output = response.json()["output"]
```

### `getUpworkJob`

Lit une offre : description, compétences, budget, activité, client. Ajoute un instantané daté au pipeline.

`POST https://piqline.com/api/v1/tools/getUpworkJob`

Type : Lecture en direct. Scopes : `explore`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `url` | `string` | Oui |  |
| `score` | `boolean` | Non |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getUpworkJob \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://exemple.fr/article"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getUpworkJob", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://exemple.fr/article"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getUpworkJob",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "url": "https://exemple.fr/article",
    },
)
output = response.json()["output"]
```

### `scoreUpworkJobs`

Note à nouveau les offres du pipeline après un changement de la base de connaissances. Aucune page n’est lue.

`POST https://piqline.com/api/v1/tools/scoreUpworkJobs`

Type : Écriture. Scopes : `write`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `jobIds` | `array<string>` | Oui |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/scoreUpworkJobs \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jobIds":["texte"]}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/scoreUpworkJobs", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "jobIds": [
      "texte"
    ]
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/scoreUpworkJobs",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "jobIds": [
            "texte",
        ],
    },
)
output = response.json()["output"]
```

### `getUpworkRadar`

Radar de marché : volume par jour, quartiles de tarif et de budget, compétences, concurrence, pays des clients.

`POST https://piqline.com/api/v1/tools/getUpworkRadar`

Type : Lecture en direct. Scopes : `explore`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `search` | `object` | Non |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getUpworkRadar \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getUpworkRadar", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getUpworkRadar",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `listUpworkLeads`

Pipeline Upwork : compte par statut, meilleures offres d’abord, issue de chacune.

`POST https://piqline.com/api/v1/tools/listUpworkLeads`

Type : Lecture. Scopes : `read`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `status` | `array<new \| shortlisted \| drafted \| submitted \| viewed \| replied \| interview \| won \| …>` | Non |  |
| `minScore` | `integer` | Non |  |
| `limit` | `integer` | Non |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/listUpworkLeads \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/listUpworkLeads", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/listUpworkLeads",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `updateUpworkLead`

Change le statut d’une offre du pipeline (envoyée, réponse, entretien, gagnée, perdue, ignorée) et garde une note.

`POST https://piqline.com/api/v1/tools/updateUpworkLead`

Type : Écriture. Scopes : `write`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `jobId` | `string` | Oui |  |
| `status` | `new \| shortlisted \| drafted \| submitted \| viewed \| replied \| interview \| won \| …` | Oui |  |
| `note` | `string` | Non |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/updateUpworkLead \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jobId":"5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70","status":"new"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/updateUpworkLead", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "jobId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70",
    "status": "new"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/updateUpworkLead",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "jobId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70",
        "status": "new",
    },
)
output = response.json()["output"]
```

### `getUpworkKnowledge`

Base de connaissances Upwork du workspace : services, outils, projets à éviter, tarifs plancher, études de cas, ton, signature.

`POST https://piqline.com/api/v1/tools/getUpworkKnowledge`

Type : Lecture. Scopes : `read`.

Cet outil n’attend aucun paramètre : envoyez un corps vide, `{}`.

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/getUpworkKnowledge \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/getUpworkKnowledge", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/getUpworkKnowledge",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `updateUpworkKnowledge`

Met à jour la base de connaissances. Les listes envoyées remplacent les listes stockées.

`POST https://piqline.com/api/v1/tools/updateUpworkKnowledge`

Type : Écriture. Scopes : `write`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `name` | `string` | Non |  |
| `headline` | `string` | Non |  |
| `services` | `array<string>` | Non |  |
| `tools` | `array<string>` | Non |  |
| `avoid` | `array<string>` | Non | Kinds of projects to never bid on, as short phrases or keywords |
| `languages` | `array<string>` | Non |  |
| `hourlyMin` | `number` | Non | Lowest acceptable hourly rate, USD |
| `fixedMin` | `number` | Non | Lowest acceptable fixed budget, USD |
| `freelancerCountry` | `string` | Non |  |
| `caseStudies` | `array<object>` | Non |  |
| `examples` | `array<object>` | Non |  |
| `tone` | `string` | Non |  |
| `signature` | `string` | Non |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/updateUpworkKnowledge \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/updateUpworkKnowledge", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/updateUpworkKnowledge",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `listUpworkTemplates`

Modèles de proposition enregistrés, avec leurs emplacements et leurs règles de questions.

`POST https://piqline.com/api/v1/tools/listUpworkTemplates`

Type : Lecture. Scopes : `read`.

Cet outil n’attend aucun paramètre : envoyez un corps vide, `{}`.

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/listUpworkTemplates \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/listUpworkTemplates", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/listUpworkTemplates",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `upsertUpworkTemplate`

Crée ou met à jour un modèle de proposition.

`POST https://piqline.com/api/v1/tools/upsertUpworkTemplate`

Type : Écriture. Scopes : `write`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `id` | `string` | Oui | Stable slug; reuse it to update |
| `name` | `string` | Oui |  |
| `body` | `string` | Oui | Literal text kept word for word. { {instruction} } = filled per job by the writer. { {var:job.title} } etc. = filled by code. |
| `questionRules` | `array<object>` | Non |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/upsertUpworkTemplate \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"id":"5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70","name":"texte","body":"texte"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/upsertUpworkTemplate", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "id": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70",
    "name": "texte",
    "body": "texte"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/upsertUpworkTemplate",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "id": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70",
        "name": "texte",
        "body": "texte",
    },
)
output = response.json()["output"]
```

### `draftUpworkProposal`

Rédige une proposition pour une offre à partir d’un modèle. Le texte reste à coller soi-même sur Upwork.

`POST https://piqline.com/api/v1/tools/draftUpworkProposal`

Type : Écriture. Scopes : `write`, `explore`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `url` | `string` | Non | Upwork job URL |
| `jobId` | `string` | Non | Job id already in the pipeline, e.g. ~022113077029286601014 |
| `templateId` | `string` | Non | Template id or name; default = first saved template, else the built-in one |
| `screeningQuestions` | `array<string>` | Non | Screening questions copied verbatim from the job |
| `extraInstructions` | `string` | Non |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/draftUpworkProposal \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/draftUpworkProposal", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/draftUpworkProposal",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `listUpworkCampaigns`

Campagnes enregistrées : recherche, score minimum, statut, dernière actualisation, santé de la source.

`POST https://piqline.com/api/v1/tools/listUpworkCampaigns`

Type : Lecture. Scopes : `read`.

Cet outil n’attend aucun paramètre : envoyez un corps vide, `{}`.

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/listUpworkCampaigns \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/listUpworkCampaigns", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/listUpworkCampaigns",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `saveUpworkCampaign`

Crée ou met à jour une campagne : nom, recherche, score minimum, modèle.

`POST https://piqline.com/api/v1/tools/saveUpworkCampaign`

Type : Écriture. Scopes : `write`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `id` | `string` | Non | Stable slug; reuse it to update an existing campaign |
| `name` | `string` | Oui |  |
| `search` | `object` | Oui |  |
| `minScore` | `integer` | Non |  |
| `templateId` | `string` | Non |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/saveUpworkCampaign \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"texte","search":{"q":"levée de fonds"}}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/saveUpworkCampaign", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "texte",
    "search": {
      "q": "levée de fonds"
    }
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/saveUpworkCampaign",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "name": "texte",
        "search": {
            "q": "levée de fonds",
        },
    },
)
output = response.json()["output"]
```

### `simulateUpworkCampaign`

Simule une campagne sur de vraies offres avant de la suivre. Rien n’est enregistré.

`POST https://piqline.com/api/v1/tools/simulateUpworkCampaign`

Type : Lecture en direct. Scopes : `explore`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `campaignId` | `string` | Non |  |
| `campaign` | `object` | Non |  |
| `pages` | `integer` | Non |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/simulateUpworkCampaign \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/simulateUpworkCampaign", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/simulateUpworkCampaign",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `followUpworkCampaign`

Demande au Motor de suivre une campagne enregistrée, à son rythme de collecte.

`POST https://piqline.com/api/v1/tools/followUpworkCampaign`

Type : Action. Scopes : `act`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `campaignId` | `string` | Oui |  |
| `name` | `string` | Non | Nom de la campagne, pour la carte de confirmation. |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/followUpworkCampaign \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"campaignId":"5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/followUpworkCampaign", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "campaignId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/followUpworkCampaign",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "campaignId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70",
    },
)
output = response.json()["output"]
```

### `pauseUpworkCampaign`

Arrête le suivi d’une campagne par le Motor. Les offres déjà vues restent dans le pipeline.

`POST https://piqline.com/api/v1/tools/pauseUpworkCampaign`

Type : Action. Scopes : `act`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `campaignId` | `string` | Oui |  |
| `name` | `string` | Non | Nom de la campagne, pour la carte de confirmation. |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/pauseUpworkCampaign \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"campaignId":"5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70"}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/pauseUpworkCampaign", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "campaignId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70"
  }),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/pauseUpworkCampaign",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={
        "campaignId": "5a0e9c1f-2b7d-4e63-8f14-d3c8a6b92e70",
    },
)
output = response.json()["output"]
```

### `refreshUpworkCampaigns`

Actualise les campagnes suivies : fusionne les offres collectées par le Motor, relit la première page en direct, note les nouvelles offres.

`POST https://piqline.com/api/v1/tools/refreshUpworkCampaigns`

Type : Écriture. Scopes : `write`, `explore`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `campaignId` | `string` | Non |  |
| `live` | `boolean` | Non |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/refreshUpworkCampaigns \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/refreshUpworkCampaigns", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/refreshUpworkCampaigns",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `checkUpworkOutcomes`

Relit les pages des candidatures en cours pour dater leur issue : clôturée, entretiens commencés, sans réponse.

`POST https://piqline.com/api/v1/tools/checkUpworkOutcomes`

Type : Écriture. Scopes : `write`, `explore`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `jobIds` | `array<string>` | Non |  |
| `limit` | `integer` | Non |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/checkUpworkOutcomes \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/checkUpworkOutcomes", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/checkUpworkOutcomes",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```

### `syncUpworkReplies`

Lit les e-mails de notification Upwork des boîtes connectées du créateur de la clé et fait avancer le statut des offres du pipeline.

`POST https://piqline.com/api/v1/tools/syncUpworkReplies`

Type : Écriture. Scopes : `write`.

| Paramètre | Type | Requis | Description |
| --- | --- | --- | --- |
| `accountId` | `string` | Non |  |
| `limit` | `integer` | Non |  |

```bash tab="curl"
curl -s https://piqline.com/api/v1/tools/syncUpworkReplies \
  -H "Authorization: Bearer $PIQLINE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```
```javascript tab="JavaScript"
const response = await fetch("https://piqline.com/api/v1/tools/syncUpworkReplies", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.PIQLINE_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({}),
});
const { output } = await response.json();
```
```python tab="Python"
import os
import requests

response = requests.post(
    "https://piqline.com/api/v1/tools/syncUpworkReplies",
    headers={"Authorization": "Bearer " + os.environ["PIQLINE_API_KEY"]},
    json={},
)
output = response.json()["output"]
```
