<!-- source: https://docs.codemagic.io/integrations/sofy-integration/ -->
<!-- last modified: 2026-02-16 -->

# Sofy integration

> How to integrate your workflows with Sofy using codemagic.yaml

**Sofy** is a testing automation platform that uses testing capabilities to enable tests without writing a single line of code. It is possible to publish binaries generated by **Codemagic** and schedule automation tests with **Sofy** via `codemagic.yaml`.

A sample project that shows how to configure Sofy integration is available in our [Sample projects repository](https://github.com/codemagic-ci-cd/codemagic-sample-projects/tree/main/integrations/sofy_integration_demo_project).


## Configuring Sofy access

You will need to sign up with [Sofy](https://sofy.ai/) so you can obtain an **API Key** which is required for deploying your apps via **Codemagic**. In addition, you will also need the **Sofy subscription key** and the **Schedule ID**, both obtainable from your Sofy account settings.

1. Open your Codemagic app settings, and go to the **Environment variables** tab.
2. Enter the desired **_Variable name_**, e.g. `SOFY_API_KEY`.
3. Copy and paste the API key string as **_Variable value_**.
4. Enter the variable group name, e.g. **_sofy_credentials_**. Click the button to create the group.
5. Make sure the **Secret** option is selected.
6. Click the **Add** button to add the variable.
7. Repeat the steps to also add `SOFY_SUBSCRIPTION_KEY`, `SOFY_SCHEDULE_ID`, and `$SOFY_SCHEDULE_GUID` variables.

8. Add the variable group to your `codemagic.yaml` file

```yaml

  environment:
    groups:
      - sofy_credentials

```



## Real Time and App Automation

The following examples show how to use **cURL** commands in your `codemagic.yaml` to deploy and test your app with Sofy.

#### Uploading apps


```yaml

  scripts:
    - name: Publish APK / AAB / IPA to Sofy
      script: | 
        curl --location "https://public.sofy.ai/parser-microservice/build-upload" \ 
          --header "x-sofy-auth-key: $SOFY_SUBSCRIPTION_KEY" \ 
          --form "applicationFile=@/build/app/outputs/flutter-apk/app-release.apk" \ 

```


#### Uploading apps with Certificate Name (if any) for iOS builds


```yaml

 scripts: 
    - name: Publishing IPA with a Certificate name
      script: |  
        curl --location "https://public.sofy.ai/parser-microservice/build-upload" \ 
          --header "x-sofy-auth-key: $SOFY_SUBSCRIPTION_KEY" \ 
          --form "applicationFile=@build/ios/ipa/native_ios_app.ipa" \ 
          --form 'CertificateName=""' 

```


#### Uploading apps with Application Guid (linking application)


```yaml

 scripts: 
    - name: Publishing APK with Application Guid 
      script: |        
        curl --location "https://public.sofy.ai/parser-microservice/build-upload" \ 
          --header "x-sofy-auth-key: SOFY_SUBSCRIPTION_KEY" \ 
          --form "applicationFile=@/build/app/outputs/flutter-apk/app-release.apk" \ 
          --form 'ApplicationGUID=""'

```




#### Scheduling automation tests


```yaml

  scripts:
    - name: Schedule an automation test with Sofy
      script: | 
          curl --location --request POST "https://public.sofy.ai/scheduler-microservice/scheduled-runs/:scheduledRunGuid/execute" \
            --header "x-sofy-auth-key: SOFY_SUBSCRIPTION_KEY" 

```


#### Scheduling automation tests on a particular build using application hash


```yaml

  scripts: 
      - name: Schedule an automation test (on a specific build) with Sofy 
        script: | 
          curl --location --request POST "https://public.sofy.ai/scheduler-microservice/scheduled-runs/:scheduledRunGuid/execute?appHash=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" \
            --header "x-sofy-auth-key: SOFY_SUBSCRIPTION_KEY"

```




> 
> Note: **:scheduledRunGuid** will be replaced by the **SOFY_SCHEDULE_GUID** variable which can be found in your Sofy account, **appHash** will be fetched from the app upload API response mentioned above.
> 



#### Fetching test run group IDs


```yaml

  scripts: 
      - name: Fetch test run group IDs with Sofy 
        script: | 
          curl --location "https://public.sofy.ai/scheduler-microservice/scheduled-runs/$SOFY_SCHEDULE_GUID/test-run-groups" \
            --header "x-sofy-auth-key: SOFY_SUBSCRIPTION_KEY" 

```


#### Checking the status of scheduled tests


```yaml

   scripts: 
      - name: Checking the status of scheduled tests 
        script: |  
          curl --location "https://public.sofy.ai/scheduler-microservice/scheduled-runs/$SOFY_SCHEDULE_GUID/status/:testRunGroupId" \
            --header "x-sofy-auth-key: SOFY_SUBSCRIPTION_KEY"

```




> 
> `:testRunGroupId` will be replaced by test run group ID fetched from the response of the `Fetching test run group IDs` step above.
> 



As soon as your **.ipa** and **.apk** are successfully built, they will appear in the **Sofy UI** and any preferred devices can be selected for testing with **Real Time**. If devices need to be pre-chosen, then some capabilities provided by **Sofy** device settings must be injected into your project's test scripts first. 

